Princeaka commited on
Commit
0215dec
·
verified ·
1 Parent(s): 18577fe

Update Dockerfile

Browse files
Files changed (1) hide show
  1. 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 and install Python dependencies
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