-
Notifications
You must be signed in to change notification settings - Fork 5
/
Dockerfile
38 lines (28 loc) · 920 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
FROM python:3.12-slim
# Install dependencies & clean up after to reduce Docker file size
RUN apt-get update && apt-get install -y \
ffmpeg \
git \
gcc \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
# Copy the requirements file first to leverage Docker cache
COPY requirements.txt .
# Upgrade pip and setuptools
RUN pip install --upgrade pip setuptools wheel
# Install Python dependencies
RUN pip3 install --no-cache-dir -r requirements.txt
# Copy application files
COPY src src
COPY config config
# Set `PYTHONUNBUFFERED` to `1` for better logging/debugging
ENV PYTHONUNBUFFERED=1
# Set environment variable to indicate running in Docker
ENV RUNNING_IN_DOCKER=true
# Optional: List files and print working directory for debugging
# (Comment these out in production)
# RUN ls -lsa
# RUN pwd
# Define the default command to run the application
CMD ["python3", "src/main.py"]