Skip to content

Commit c6f62d7

Browse files
committed
add docker compose and guidelines
1 parent 221c8da commit c6f62d7

2 files changed

Lines changed: 65 additions & 0 deletions

File tree

README.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,35 @@ You can also follow the original environment installation instructions for every
192192
[10].OpenAI GPT-4o mini. https://openai.com/index/gpt-4o-mini-advancing-cost-efficient-intelligence/ (2024).
193193
```
194194

195+
### Docker Deployment 🐳
196+
197+
For quick deployment using Docker Compose:
198+
199+
```bash
200+
# Clone the repository
201+
git clone https://github.com/QSong-github/scDrugMap.git
202+
cd scDrugMap
203+
204+
# Start the services
205+
docker-compose up -d
206+
207+
# Check service status
208+
docker-compose ps
209+
210+
# View logs
211+
docker-compose logs -f
212+
213+
# Stop services
214+
docker-compose down
215+
```
216+
217+
**Important Notes:**
218+
- The backend image contains multiple LLM weights and is quite large (~10GB+), so the initial pull may take some time depending on your internet connection
219+
- The frontend will be available at: http://localhost:3000
220+
- The backend API will be available at: http://localhost:8000
221+
- Both services will start automatically and the frontend will wait for the backend to be ready
222+
223+
195224
### Citation
196225
@article{wang2025scdrugmap,
197226
title={scDrugMap: Benchmarking Large Foundation Models for Drug Response Prediction},

docker-compose.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# version: "3.9"
2+
3+
services:
4+
backend:
5+
image: minghaozhou01/scdrugmap-backend:latest # ← 从 Docker Hub 拉
6+
container_name: scdrugmap-backend
7+
ports:
8+
- "8000:8000"
9+
environment:
10+
- DJANGO_SETTINGS_MODULE=geneAnalysis.settings
11+
- CORS_ALLOWED_ORIGINS=http://localhost:3000,http://127.0.0.1:3000
12+
- TRANSFORMERS_NO_TORCHVISION=1
13+
healthcheck:
14+
test: ["CMD", "sh", "-c", "nc -z localhost 8000 || exit 1"]
15+
interval: 10s
16+
timeout: 3s
17+
retries: 6
18+
# 如需 GPU,在运行命令加 --gpus all(见下方说明)
19+
20+
frontend:
21+
image: minghaozhou01/scdrugmap-frontend:latest # ← 从 Docker Hub 拉
22+
container_name: scdrugmap-frontend
23+
ports:
24+
- "3000:3000"
25+
environment:
26+
# 浏览器调用后端用 localhost(宿主机端口映射到 backend:8000)
27+
- NEXT_PUBLIC_API_URL=http://localhost:8000
28+
- NODE_ENV=production
29+
# 可选:SSR/Node 侧直连后端容器(如果你的前端服务端代码需要)
30+
- INTERNAL_API_URL=http://backend:8000
31+
depends_on:
32+
- backend
33+
34+
# 如需挂卷可启用
35+
# volumes:
36+
# hf_cache:

0 commit comments

Comments
 (0)