add Dockerfile + docker-compose (port 3849 on .82)

This commit is contained in:
2026-04-21 09:57:42 +00:00
parent b7d957c806
commit 857ebcf7df
2 changed files with 35 additions and 0 deletions

17
Dockerfile Normal file
View File

@@ -0,0 +1,17 @@
FROM python:3.12-slim
WORKDIR /app
RUN pip install --no-cache-dir \
fastapi==0.115.12 \
"uvicorn[standard]==0.34.0" \
jinja2==3.1.6 \
python-multipart==0.0.20
COPY app/ ./app/
ENV COSMA_QC_DB=/var/lib/cosma-qc/jobs.db
EXPOSE 8000
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000"]

18
docker-compose.yml Normal file
View File

@@ -0,0 +1,18 @@
services:
cosma-qc:
build: .
container_name: cosma-qc
restart: unless-stopped
ports:
- "3849:8000"
volumes:
- cosma-qc-db:/var/lib/cosma-qc
environment:
COSMA_QC_WORKERS: |
[
{"host":"192.168.0.87","ssh_alias":"gpu","gpu":"RTX 3060 12GB"},
{"host":"192.168.0.84","ssh_alias":"cosma-vm","gpu":"RTX 3090 24GB"}
]
volumes:
cosma-qc-db: