-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
24 lines (17 loc) · 714 Bytes
/
Copy pathDockerfile
File metadata and controls
24 lines (17 loc) · 714 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
# ============================================================
# Dockerfile — offline build (packages pre-downloaded)
#
# All .whl files are in ./packages/ — pip installs from disk.
# No internet connection needed inside Docker at build time.
# This is the reliable solution for slow/unstable connections.
# ============================================================
FROM python:3.12-slim
WORKDIR /app
# Copy pre-downloaded wheels into the image
COPY packages/ /packages/
# Install from local wheels — no network calls at all
RUN pip install --no-index --find-links=/packages /packages/*.whl
# Copy source code
COPY . .
EXPOSE 8000
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"]