Ajustes no dockerfile

This commit is contained in:
LeoMortari
2025-10-22 13:14:56 -03:00
parent c641fd6331
commit b9e1dcd1e2
2 changed files with 49 additions and 17 deletions

View File

@@ -2,12 +2,15 @@ FROM python:3.11-slim
WORKDIR /app
ENV DEBIAN_FRONTEND=noninteractive
# Set environment variables
ENV DEBIAN_FRONTEND=noninteractive \
PYTHONUNBUFFERED=1 \
PYTHONDONTWRITEBYTECODE=1
# Install system dependencies
RUN apt-get update && \
apt-get install -y --no-install-recommends \
ffmpeg \
pkg-config \
libavcodec-dev \
libavdevice-dev \
libavfilter-dev \
@@ -15,33 +18,31 @@ RUN apt-get update && \
libavutil-dev \
libswresample-dev \
libswscale-dev \
gcc \
g++ \
libgl1 \
libglib2.0-0 \
libgomp1 \
libpq-dev \
libmagick++-dev \
imagemagick \
fonts-liberation \
sox \
bc \
gsfonts \
xvfb \
xdg-utils \
wget \
unzip \
vim && \
rm -rf /var/lib/apt/lists/*
&& rm -rf /var/lib/apt/lists/*
COPY requirements.txt ./
# Copy requirements first to leverage Docker cache
COPY requirements.txt .
RUN pip install --no-cache-dir --upgrade pip setuptools wheel
RUN pip install --no-cache-dir -r requirements.txt
# Install Python dependencies
RUN pip install --no-cache-dir --upgrade pip && \
pip install --no-cache-dir setuptools wheel && \
pip install --no-cache-dir -r requirements.txt
# Copy the rest of the application
COPY . .
# Create necessary directories
RUN mkdir -p /app/videos /app/outputs
# Set volumes
VOLUME ["/app/videos", "/app/outputs"]
# Set the command to run your application
CMD ["python", "-u", "main.py"]