Spaces:
Running
Running
Update Dockerfile
Browse files- Dockerfile +8 -4
Dockerfile
CHANGED
@@ -11,7 +11,6 @@ COPY frontend ./
|
|
11 |
RUN npm run build
|
12 |
|
13 |
# --- Backend Stage (FastAPI + Python) ---
|
14 |
-
# Use full Debian image for compatibility with Python packages
|
15 |
FROM python:3.11-bullseye
|
16 |
WORKDIR /app
|
17 |
|
@@ -28,10 +27,15 @@ RUN apt-get update && \
|
|
28 |
python3-dev \
|
29 |
&& rm -rf /var/lib/apt/lists/*
|
30 |
|
31 |
-
# Copy requirements
|
32 |
-
COPY requirements.txt ./
|
|
|
|
|
33 |
RUN pip install --upgrade pip
|
34 |
-
RUN pip install --no-cache-dir -r requirements.txt
|
|
|
|
|
|
|
35 |
|
36 |
# Copy backend code
|
37 |
COPY backend ./backend
|
|
|
11 |
RUN npm run build
|
12 |
|
13 |
# --- Backend Stage (FastAPI + Python) ---
|
|
|
14 |
FROM python:3.11-bullseye
|
15 |
WORKDIR /app
|
16 |
|
|
|
27 |
python3-dev \
|
28 |
&& rm -rf /var/lib/apt/lists/*
|
29 |
|
30 |
+
# Copy requirements (split into small and large)
|
31 |
+
COPY requirements-small.txt requirements-large.txt ./
|
32 |
+
|
33 |
+
# Install small packages first (quick, low risk)
|
34 |
RUN pip install --upgrade pip
|
35 |
+
RUN pip install --no-cache-dir -r requirements-small.txt
|
36 |
+
|
37 |
+
# Install large packages separately (can resume if interrupted)
|
38 |
+
RUN pip install --no-cache-dir -r requirements-large.txt
|
39 |
|
40 |
# Copy backend code
|
41 |
COPY backend ./backend
|