-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
30 lines (23 loc) · 745 Bytes
/
Copy pathDockerfile
File metadata and controls
30 lines (23 loc) · 745 Bytes
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
# Backend runtime image
FROM python:3.12-slim
ENV PYTHONUNBUFFERED=1 \
UV_SYSTEM_PYTHON=1
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
libglib2.0-0 \
libgl1 \
libsm6 \
libxext6 \
libxrender-dev \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
# Install uv and project dependencies first for better caching
# Copy project metadata and sources for installation
COPY pyproject.toml uv.lock ./
COPY src ./src
RUN pip install --no-cache-dir uv \
&& uv pip install --system .
# Copy models (optional; mount alternate volumes in production if desired)
COPY models ./models
EXPOSE 8000
CMD ["python", "-m", "uvicorn", "blur_api.serve:app", "--host", "0.0.0.0", "--port", "8000"]