Rate This Document
Findability
Accuracy
Completeness
Readability

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.

  1. 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"
  2. Go to the /path/to/tfserving directory.
    cd /path/to/tfserving
  3. Obtain the TF-Serving source code.
    git clone https://github.com/tensorflow/serving.git -b r2.15
  4. Go to the serving directory.
    cd serving/
  5. Create the proxy directory.
    mkdir proxy
  6. 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.