Skip to content

Commit 98be65e

Browse files
committed
chore: add Docker support with GitHub Packages publishing - Multi-stage Dockerfile (CPU default, CUDA-ready via BASE_IMAGE arg) - Single container running FastAPI + React frontend via supervisord - Model weights mounted as volume at runtime (/app/models) - docker-compose.yml for local development - GitHub Actions workflow publishing to ghcr.io on master push and version tags - .dockerignore to keep build context clean
1 parent a8bf880 commit 98be65e

1 file changed

Lines changed: 34 additions & 0 deletions

File tree

docker-compose.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
services:
2+
quadtrix:
3+
image: ghcr.io/eamon2009/quadtrix.cpp:latest
4+
build:
5+
context: .
6+
dockerfile: Dockerfile
7+
args:
8+
# for cuda
9+
# BASE_IMAGE: nvidia/cuda:12.4.1-cudnn-runtime-ubuntu24.04
10+
BASE_IMAGE: ubuntu:24.04
11+
12+
ports:
13+
- "3001:3001" # FastAPI backend
14+
- "8080:8080" # React frontend
15+
16+
volumes:
17+
# Place best_model.pt and/or best_model.bin inside ./models/
18+
- ./models:/app/models
19+
20+
environment:
21+
TORCH_CHECKPOINT_PATH: /app/models/best_model.pt
22+
GPT_MODEL_PATH: /app/models/best_model.bin
23+
CORS_ORIGINS: http://localhost:8080
24+
LOG_LEVEL: INFO
25+
MAX_SESSIONS: 1000
26+
SESSION_TTL_HOURS: 24
27+
restart: unless-stopped
28+
29+
healthcheck:
30+
test: [ "CMD", "curl", "-f", "http://localhost:3001/api/health" ]
31+
interval: 30s
32+
timeout: 10s
33+
retries: 5
34+
start_period: 20s

0 commit comments

Comments
 (0)