ZeeAI1 commited on
Commit
1274c31
Β·
verified Β·
1 Parent(s): 91a1198

Update dockerfile

Browse files
Files changed (1) hide show
  1. dockerfile +22 -3
dockerfile CHANGED
@@ -1,7 +1,26 @@
1
- FROM python:3.10
 
 
 
2
  WORKDIR /app
 
 
3
  COPY requirements.txt .
4
- RUN pip install --no-cache-dir -r requirements.txt
5
- RUN python -m spacy download en_core_web_sm
 
 
 
 
 
 
 
 
 
6
  COPY . .
 
 
 
 
 
7
  CMD ["python", "app.py"]
 
1
+ # Use Python 3.10 as the base image
2
+ FROM python:3.10-slim
3
+
4
+ # Set working directory
5
  WORKDIR /app
6
+
7
+ # Copy requirements.txt
8
  COPY requirements.txt .
9
+
10
+ # Install system dependencies and Python packages
11
+ RUN apt-get update && apt-get install -y --no-install-recommends \
12
+ gcc \
13
+ python3-dev \
14
+ && pip install --no-cache-dir -r requirements.txt \
15
+ && python -m spacy download en_core_web_sm \
16
+ && apt-get clean \
17
+ && rm -rf /var/lib/apt/lists/*
18
+
19
+ # Copy all files
20
  COPY . .
21
+
22
+ # Ensure write permissions for SQLite database
23
+ RUN chmod -R 777 /app
24
+
25
+ # Run the application
26
  CMD ["python", "app.py"]