-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathDockerfile
More file actions
36 lines (28 loc) · 772 Bytes
/
Dockerfile
File metadata and controls
36 lines (28 loc) · 772 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
# Use the official Python image from the Docker Hub
FROM python:3.9-slim
# Set environment variables
ENV PYTHONUNBUFFERED=1
ENV PORT=8080
ENV HOST=0.0.0.0
# Set the working directory
WORKDIR /app
# Copy the requirements file into the image
COPY requirements.txt /app/
# Install system dependencies
RUN apt-get update && \
apt-get install -y \
tesseract-ocr \
tesseract-ocr-eng \
ffmpeg \
build-essential \
cmake \
&& rm -rf /var/lib/apt/lists/*
# Upgrade pip and install Python dependencies
#RUN pip install --upgrade pip setuptools wheel
RUN pip install --no-cache-dir -r requirements.txt
# Copy the rest of the application code
COPY . /app/
# Expose the port the app runs on
EXPOSE 8080
# Run the application
CMD ["python", "app.py"]