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
+8
View File
@@ -114,10 +114,18 @@ docker run --gpus all -p 8000:8000 astrai:latest \
# Run with volume mount for data
docker run --gpus all -v /path/to/data:/data -it astrai:latest
# Docker Compose (GPU, default)
docker compose up -d
# Docker Compose (CPU only)
docker compose --profile cpu up -d
```
> **Note**: `--gpus all` is required for CUDA support. Without it, `torch.cuda.is_available()` will return `False`.
> **Note**: `--gpus all` is required for CUDA support. Without it, `torch.cuda.is_available()` will return `False`.
#### Start HTTP Server
Start the inference server with OpenAI and Anthropic-compatible HTTP API: