docker-compose.yml 738 B

1234567891011121314151617181920212223242526272829
  1. version: '3.8'
  2. services:
  3. triton-server:
  4. build:
  5. context: .
  6. dockerfile: Dockerfile
  7. image: my-tritonserver:25.05-vllm-python-py3
  8. ports:
  9. - "8000:8000"
  10. environment:
  11. - TZ=Asia/Shanghai
  12. - PYTHONDONTWRITEBYTECODE=1
  13. - PYTHONUNBUFFERED=1
  14. - PIP_DISABLE_PIP_VERSION_CHECK=on
  15. # 如果需要GPU支持,取消下面的注释
  16. deploy:
  17. resources:
  18. reservations:
  19. devices:
  20. - driver: nvidia
  21. count: 1
  22. capabilities: [gpu]
  23. # 如果需要挂载模型数据卷,取消下面的注释
  24. # volumes:
  25. # - ./models:/app/models
  26. # 如果需要设置资源限制,取消下面的注释
  27. # mem_limit: 8g
  28. # cpus: 4.0