-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
39 lines (30 loc) · 867 Bytes
/
Dockerfile
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
27
28
29
30
31
32
33
34
35
36
37
38
39
FROM python:3.9-slim
# Install system dependencies
RUN apt-get update && apt-get install -y \
ffmpeg \
libsm6 \
libxext6 \
libgl1-mesa-glx \
tesseract-ocr \
git \
&& rm -rf /var/lib/apt/lists/*
# Set up working directory
WORKDIR /app
# Copy requirements first for layer caching
COPY requirements.txt .
# Install Python packages and spaCy models
RUN pip install -r requirements.txt && \
python -m spacy download en_core_web_sm && \
python -m spacy download fr_core_news_sm && \
python -m spacy download es_core_news_sm && \
python -m spacy download de_core_news_sm
# Create necessary directories
RUN mkdir -p output uploads saved_results
# Copy application code
COPY . .
# Environment variables
ENV FLASK_APP=run.py
ENV FLASK_ENV=development
ENV PYTHONUNBUFFERED=1
EXPOSE 8080
CMD ["flask", "run", "--host=0.0.0.0"]