compose.yml 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. version: '3.5'
  2. services:
  3. devzhq:
  4. # --- building ---
  5. image: devzhq:2024
  6. build:
  7. context: ./
  8. dockerfile: ./Dockerfile
  9. environment:
  10. TZ: Asia/Shanghai
  11. LC_ALL: C.UTF-8
  12. LANG: C.UTF-8
  13. # --- binding ---
  14. runtime: nvidia
  15. ipc: host
  16. shm_size: 8g # 共享内存 默认64m
  17. volumes:
  18. - /media/nvidia/nvme0n1:/media/nvidia/nvme0n1
  19. - /dev:/dev
  20. # networks:
  21. # - sri_network
  22. # ports:
  23. # - "39999:39999"
  24. network_mode: host
  25. # --- running ---
  26. container_name: devzhq
  27. cap_add:
  28. - SYS_ADMIN
  29. privileged: true
  30. # --- for debug ---
  31. working_dir: /media/nvidia/nvme0n1
  32. stdin_open: true
  33. tty: true
  34. # --- for release ---
  35. # working_dir: /media/nvidia/nvme0n1/server/repositories/repositories/sri-project.demo-cpp
  36. # command: bash run.sh
  37. # restart: always
  38. #networks:
  39. # sri_network:
  40. # external: true