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