-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
40 lines (29 loc) · 1.1 KB
/
Dockerfile
File metadata and controls
40 lines (29 loc) · 1.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# Single image for MedArmor backend, Celery worker, Celery beat, and EHR service.
# Build from demo/: docker build -f Dockerfile -t medarmor-app .
# All four Python services use this image with different commands.
FROM ghcr.io/astral-sh/uv:python3.12-bookworm-slim
WORKDIR /app
# System deps: psycopg2 + ffmpeg (required by librosa/audioread for webm decoding in local ASR)
RUN apt-get update && apt-get install -y --no-install-recommends \
libpq5 \
ffmpeg \
&& rm -rf /var/lib/apt/lists/*
ENV UV_NO_DEV=1
# Backend deps
COPY backend/pyproject.toml backend/uv.lock ./
RUN --mount=type=cache,target=/root/.cache/uv \
uv sync --frozen --no-install-project
# Backend app
COPY backend/main.py ./
COPY backend/app/ ./app/
COPY backend/scripts/ ./scripts/
RUN --mount=type=cache,target=/root/.cache/uv \
uv sync --frozen
# EHR service (same image, run as uvicorn ehr.server:app)
RUN mkdir -p ehr
COPY ehr/server.py ehr/__init__.py ehr/
ENV PYTHONUNBUFFERED=1
ENV PYTHONDONTWRITEBYTECODE=1
ENV PATH="/app/.venv/bin:$PATH"
EXPOSE 8000
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"]