start_torch_serve.sh 737 B

1234567891011121314151617181920
  1. #!/bin/sh
  2. # shellcheck disable=SC2046
  3. docker run \
  4. --rm \
  5. -it \
  6. --gpus '"device=0,1"' \
  7. -p 8080:8080 \
  8. -p 8081:8081 \
  9. -p 8082:8082 \
  10. -p 7070:7070 \
  11. -p 7071:7071 \
  12. --user root \
  13. --name yolov5_torch_serve-gpu \
  14. -e install_py_dep_per_model=true \
  15. --mount type=bind,source=$(pwd)/models-server/model-store,target=/home/models-server/model-store \
  16. torchserve:cu11-1.0 \
  17. torchserve --start --model-store /home/models-server/model-store \
  18. --models yolov5=yolov5.mar \
  19. --ts-config /home/models-server/model-store/yolov5_config.properties \
  20. # --log-config /home/models-server/model-store/yolov5_log4j2.xml