feat: 新增 Docker Compose 一键部署,支持 GPU/CPU 双模式

This commit is contained in:
2026-05-09 11:57:46 +08:00
parent d73f52a2f8
commit 34a511e36e
4 changed files with 57 additions and 0 deletions
+6
View File
@@ -120,6 +120,12 @@ docker run --gpus all -p 8000:8000 astrai:latest \
# 挂载数据卷
docker run --gpus all -v /path/to/data:/data -it astrai:latest
# Docker ComposeGPU,默认)
docker compose up -d
# Docker Compose(仅 CPU
docker compose --profile cpu up -d
```
> **注意**: 必须使用 `--gpus all` 才能启用 CUDA 支持,否则 `torch.cuda.is_available()` 将返回 `False`。