1
This commit is contained in:
29
docker-compose.yaml
Normal file
29
docker-compose.yaml
Normal file
@@ -0,0 +1,29 @@
|
||||
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
|
||||
"
|
||||
Reference in New Issue
Block a user