norhan12 commited on
Commit
6c5ba2b
·
verified ·
1 Parent(s): a0cb397

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +3 -3
Dockerfile CHANGED
@@ -38,11 +38,11 @@ COPY --chown=appuser:appuser requirements.txt .
38
 
39
  USER appuser
40
 
41
- # Install dependencies (Removed pip check temporarily for debugging)
 
42
  RUN pip install --upgrade pip && \
43
- pip install --no-cache-dir -r requirements.txt && \
44
  python -m spacy download en_core_web_sm
45
-
46
  # --- OPTIMIZATION: Copy the rest of the code AFTER dependencies are installed ---
47
  COPY --chown=appuser:appuser . .
48
 
 
38
 
39
  USER appuser
40
 
41
+ # 7. Install Python dependencies as non-root user
42
+ USER appuser
43
  RUN pip install --upgrade pip && \
44
+ pip install --no-cache-dir --prefer-binary -r requirements.txt && \
45
  python -m spacy download en_core_web_sm
 
46
  # --- OPTIMIZATION: Copy the rest of the code AFTER dependencies are installed ---
47
  COPY --chown=appuser:appuser . .
48