forked from potpie-ai/potpie
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdockerfile
More file actions
37 lines (27 loc) · 1.08 KB
/
dockerfile
File metadata and controls
37 lines (27 loc) · 1.08 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
FROM python:3.11-slim
ENV PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1 \
PIP_DISABLE_PIP_VERSION_CHECK=1 \
PIP_NO_CACHE_DIR=1
WORKDIR /app
# System deps
RUN apt-get update && apt-get install -y --no-install-recommends \
ca-certificates curl git supervisor \
&& rm -rf /var/lib/apt/lists/*
# Install uv
RUN curl -LsSf https://astral.sh/uv/install.sh | sh
ENV PATH="/root/.local/bin:${PATH}"
# ✅ Copy ONLY dependency files first (for cache)
COPY requirements.fly.txt /app/requirements.fly.txt
# ✅ Install heavy deps before app code (cached unless requirements change)
RUN uv pip install --system --index-url https://download.pytorch.org/whl/cpu "torch==2.9.1" \
&& uv pip install --system -r /app/requirements.fly.txt \
&& rm -rf /root/.cache /tmp/*
# Supervisor confs
COPY supervisord.server.conf /etc/supervisor/conf.d/server.conf
COPY supervisord.worker.conf /etc/supervisor/conf.d/worker.conf
# Copy app code last
COPY . /app
EXPOSE 8001
# Default process (Fly will override via fly.toml [processes])
CMD ["supervisord", "-n", "-c", "/etc/supervisor/conf.d/server.conf"]