add Dockerfile + docker-compose (port 3849 on .82)
This commit is contained in:
17
Dockerfile
Normal file
17
Dockerfile
Normal 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
18
docker-compose.yml
Normal 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:
|
||||
Reference in New Issue
Block a user