File size: 598 Bytes
1274c31
 
 
 
91a1198
1274c31
 
91a1198
1274c31
 
 
 
 
 
 
 
 
 
 
91a1198
1274c31
 
 
 
 
91a1198
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# Use Python 3.10 as the base image
FROM python:3.10-slim

# Set working directory
WORKDIR /app

# Copy requirements.txt
COPY requirements.txt .

# Install system dependencies and Python packages
RUN apt-get update && apt-get install -y --no-install-recommends \
    gcc \
    python3-dev \
    && pip install --no-cache-dir -r requirements.txt \
    && python -m spacy download en_core_web_sm \
    && apt-get clean \
    && rm -rf /var/lib/apt/lists/*

# Copy all files
COPY . .

# Ensure write permissions for SQLite database
RUN chmod -R 777 /app

# Run the application
CMD ["python", "app.py"]