-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
45 lines (36 loc) · 963 Bytes
/
Dockerfile
File metadata and controls
45 lines (36 loc) · 963 Bytes
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
40
41
42
43
44
45
FROM python:3.11-slim
# Install system dependencies
RUN apt-get update && apt-get install -y \
libgl1-mesa-glx \
libglib2.0-0 \
libsm6 \
libxext6 \
libxrender-dev \
tesseract-ocr \
tesseract-ocr-eng \
build-essential \
cmake \
pkg-config \
libhdf5-dev \
libhdf5-serial-dev \
python3-setuptools \
git \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
# Copy requirements first for better caching
COPY requirements.txt .
# Install Python packages
RUN pip install --no-cache-dir -r requirements.txt && \
pip install --no-cache-dir git+https://github.com/konstantint/PassportEye.git
# Copy the rest of the application
COPY . .
# Create upload directory
RUN mkdir -p static/uploads
# Set environment variables
ENV FLASK_APP=app.py
ENV FLASK_ENV=production
ENV PYTHONUNBUFFERED=1
# Expose the port
EXPOSE 8080
# Run the application with gunicorn
CMD ["gunicorn", "--bind", "0.0.0.0:8080", "app:app"]