Compiling the TF-Serving Source Code
Configure the Git network proxy, run the git command to obtain the TF-Serving source code, go to the source code directory, and compile the source code.
- Configure a Git network proxy.
git config --global http.sslVerify false git config --global https.sslverify false git config --global http.proxy "http://Username:Password@Proxy_IP_address:Proxy_port"
- Go to the /path/to/tfserving directory.
cd /path/to/tfserving
- Obtain the TF-Serving source code.
git clone https://github.com/tensorflow/serving.git -b r2.15
- Go to the serving directory.
cd serving/
- Create the proxy directory.
mkdir proxy
- Compile the source code.
bazel --output_user_root=./output build -c opt --distdir=./proxy tensorflow_serving/model_servers:tensorflow_model_server
output_user_root: Compilation output directory.
distdir: Directory for storing the manually downloaded TF-Serving dependency packages when the network is unstable.
- "Error in download_and_extract" may be displayed when you build TF-Serving. For details about how to solve this problem, see Failed to Download the TF-Serving Source Code Dependency.
- A message may be displayed indicating that the sub-repository is not completely downloaded when you download the important dependency org_boost library of TF-Serving. For details about how to solve this problem, see Failed to Obtain the Dependency of the org_boost Sub-repository.
- A message may be displayed indicating that no Golang website certificate is available when you build TF-Serving. For details about how to solve this problem, see No Golang Website Certificate.
- An error may occur when the upd.c file is compiled during TF-Serving building. For details about the solution, see Syntax Error Reported During upb.c Compilation.