我在服务中添加了一些自定义代码,我想为自定义服务(尤其是ReloadConfig API)构建自己的tensorflow-serving-api。但是我不知道如何自己构建它。看来我只能从pip安装tensorflow-serving-api
。
有什么建议么?谢谢。
答案 0 :(得分:0)
这是如何执行此操作的示例:
# Pull the latest source code (or pick a release branch)
$ git clone https://github.com/tensorflow/serving .
# Make changes you'd want to make
# Build the pip package using the latest nightly docker build
$ tools/bazel_in_docker.sh bazel build --color=yes tensorflow_serving/tools/pip_package:build_pip_package
# Run the pip package builder using the latest nightly docker build
$ tools/bazel_in_docker.sh bazel-bin/tensorflow_serving/tools/pip_package/build_pip_package $(pwd)/pip
# Install the package that has your custom code
$ pip --no-cache-dir install --upgrade $(pwd)/pip/tensorflow_serving*.whl
# Clean up your extracted folder (optional)
$ rm -rf $(pwd)/pip