Files
FiDA-3D-Trellis/docker-compose.yaml
2026-03-17 11:29:17 +08:00

29 lines
961 B
YAML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
services:
trellis:
image: my-trellis-with-blender:20260317 # 你 commit 的镜像
container_name: trellis-dev
restart: unless-stopped
environment:
- NVIDIA_VISIBLE_DEVICES=all
- NVIDIA_DRIVER_CAPABILITIES=compute,utility,video
volumes:
- .:/workspace # 当前目录挂载到 /workspace便于开发
ports:
- "7412:8120"
working_dir: /workspace
tty: true
stdin_open: true
# 最新GPU配置方式替代旧的环境变量声明更规范
runtime: nvidia
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: all # 使用所有可用GPU也可指定数量如count: 1
capabilities: [ gpu, compute, video ]
command: >
bash -c "
/opt/conda/envs/trellis/bin/python -c 'import torch; print(torch.__version__, torch.cuda.is_available())' &&
tail -f /dev/null
"