-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
32 lines (26 loc) · 836 Bytes
/
Copy pathDockerfile
File metadata and controls
32 lines (26 loc) · 836 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
# Use a slim Python image as the base
FROM python:3.10.11-slim
# Install necessary system packages
RUN apt-get update && apt-get install -y --no-install-recommends \
tesseract-ocr \
tesseract-ocr-nld \
libtesseract-dev \
poppler-utils && \
apt-get clean && rm -rf /var/lib/apt/lists/*
# Set the working directory
WORKDIR /app
# Copy the requirements file and install Python dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy the rest of the application code
COPY . .
# Expose a fixed port
EXPOSE 10010
# Run the application using Gunicorn with configurable options
CMD ["gunicorn", "--bind", "0.0.0.0:10010", \
"--workers", "2", \
"--timeout", "760", \
"--max-requests", "500", \
"--worker-class", "gthread", \
"--threads", "2", \
"app:app"]