Distopia22 commited on
Commit
6f771aa
·
1 Parent(s): fd20bd2

Fix: Update Dockerfile for spaCy model small one

Browse files
Files changed (1) hide show
  1. Dockerfile +8 -7
Dockerfile CHANGED
@@ -2,20 +2,21 @@ FROM python:3.11-slim
2
 
3
  WORKDIR /app
4
 
5
- # Copy requirements first for better caching
6
  COPY requirements.txt .
7
 
8
  # Install dependencies
9
- RUN pip install --no-cache-dir -r requirements.txt
 
10
 
11
- # Download spaCy model for Presidio (required for PII detection)
12
- RUN python -m spacy download en_core_web_lg
13
 
14
- # Copy the entire backend
15
  COPY . .
16
 
17
- # Expose port 7860 (Hugging Face Spaces default)
18
  EXPOSE 7860
19
 
20
- # Run the application
21
  CMD ["python", "src/main.py"]
 
2
 
3
  WORKDIR /app
4
 
5
+ # Copy requirements
6
  COPY requirements.txt .
7
 
8
  # Install dependencies
9
+ RUN pip install --no-cache-dir --upgrade pip && \
10
+ pip install --no-cache-dir -r requirements.txt
11
 
12
+ # Download spaCy model (use small model - it's sufficient)
13
+ RUN python -m spacy download en_core_web_sm
14
 
15
+ # Copy application
16
  COPY . .
17
 
18
+ # Expose port
19
  EXPOSE 7860
20
 
21
+ # Run
22
  CMD ["python", "src/main.py"]