自定义Windows Server 2019构建Triton Server镜像后如何启动?
构建基于Windows的Triton Server镜像
- 构建Triton Server 22.11版本的
Dockerfile.win10.min失败,原因是构建所需的基础镜像无法下载。 - 为完成镜像构建,将Triton Server版本降级至22.10,同时需下载适配的CUDNN和TENSORRT版本。使用以下命令成功构建22.10版本的基础镜像:
docker build -t win10-py3-min -f Dockerfile.win10.min .
- 基础镜像构建完成后,尝试用以下命令构建Triton Server镜像(需指定合适的容器标签及所需后端):
python build.py --cmake-dir=<path/to/repo>/build --build-dir=/tmp/citritonbuild --no-container-pull --image=base,win10-py3-min --enable-logging --enable-stats --enable-tracing --enable-gpu --endpoint=grpc --endpoint=http --repo-tag=common:<container tag> --repo-tag=core:<container tag> --repo-tag=backend:<container tag> --repo-tag=thirdparty:<container tag> --backend=ensemble --backend=tensorrt:<container tag> --backend=onnxruntime:<container tag> --backend=openvino:<container tag>
尝试不同参数运行build.py均失败,存在CMAKE、Rapid Json相关问题。
- 参考相关建议,尝试最新稳定版本22.12。该版本构建基础镜像所需操作系统与22.11一致,因此沿用之前可正常工作的22.10版本的
Dockerfile.win10.min来构建基础镜像。 - 调整
build.py参数后成功构建Triton Server镜像,但最初构建的镜像缺少启动服务器所需的tritonserver.exe,最终构建出包含该文件的镜像,使用命令如下:
python build.py -v --no-container-pull --image=base,win10-py3-min --enable-logging --enable-stats --enable-tracing --enable-gpu --endpoint=grpc --endpoint=http --repo-tag=common:r22.12 --repo-tag=core:r22.12 --repo-tag=backend:r22.12 --repo-tag=thirdparty:r22.12 --backend=ensemble
- 启动Triton Server需将本地模型仓库挂载至Docker镜像,启动命令如下:
docker run -it -v C:/Users/Desktop/model_repository:C:/opt/tritonserver/models tritonserver:latest bin/tritonserver.exe --model-repository=C/opt/tritonserver/models
启动时出现以下错误:
无法调整终端大小,使用默认尺寸
内容的提问来源于stack exchange,提问作者Gp01
相关产品推荐
相关产品推荐

