Ajustes no dockerfile
This commit is contained in:
31
.gitignore
vendored
Normal file
31
.gitignore
vendored
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
# Ignore Python files
|
||||||
|
*.pyc
|
||||||
|
*.pyo
|
||||||
|
*.pyd
|
||||||
|
__pycache__/
|
||||||
|
*.egg-info/
|
||||||
|
.eggs/
|
||||||
|
dist/
|
||||||
|
build/
|
||||||
|
doc/
|
||||||
|
|
||||||
|
# Ignore virtual envs
|
||||||
|
venv/
|
||||||
|
env/
|
||||||
|
|
||||||
|
# Ignore editor files
|
||||||
|
.idea/
|
||||||
|
*.swp
|
||||||
|
*.swo
|
||||||
|
|
||||||
|
# Ignore project files
|
||||||
|
*.tmproj
|
||||||
|
*.sublime-project
|
||||||
|
*.sublime-workspace
|
||||||
|
|
||||||
|
# Ignore git itself
|
||||||
|
.git
|
||||||
|
|
||||||
|
# Ignore mypy and pylint cache
|
||||||
|
.mypy_cache/
|
||||||
|
.pylint.d/
|
||||||
35
dockerfile
35
dockerfile
@@ -2,12 +2,15 @@ FROM python:3.11-slim
|
|||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
ENV DEBIAN_FRONTEND=noninteractive
|
# Set environment variables
|
||||||
|
ENV DEBIAN_FRONTEND=noninteractive \
|
||||||
|
PYTHONUNBUFFERED=1 \
|
||||||
|
PYTHONDONTWRITEBYTECODE=1
|
||||||
|
|
||||||
|
# Install system dependencies
|
||||||
RUN apt-get update && \
|
RUN apt-get update && \
|
||||||
apt-get install -y --no-install-recommends \
|
apt-get install -y --no-install-recommends \
|
||||||
ffmpeg \
|
ffmpeg \
|
||||||
pkg-config \
|
|
||||||
libavcodec-dev \
|
libavcodec-dev \
|
||||||
libavdevice-dev \
|
libavdevice-dev \
|
||||||
libavfilter-dev \
|
libavfilter-dev \
|
||||||
@@ -15,33 +18,31 @@ RUN apt-get update && \
|
|||||||
libavutil-dev \
|
libavutil-dev \
|
||||||
libswresample-dev \
|
libswresample-dev \
|
||||||
libswscale-dev \
|
libswscale-dev \
|
||||||
gcc \
|
|
||||||
g++ \
|
|
||||||
libgl1 \
|
libgl1 \
|
||||||
libglib2.0-0 \
|
libglib2.0-0 \
|
||||||
libgomp1 \
|
libgomp1 \
|
||||||
libpq-dev \
|
|
||||||
libmagick++-dev \
|
libmagick++-dev \
|
||||||
imagemagick \
|
imagemagick \
|
||||||
fonts-liberation \
|
fonts-liberation \
|
||||||
sox \
|
|
||||||
bc \
|
|
||||||
gsfonts \
|
|
||||||
xvfb \
|
|
||||||
xdg-utils \
|
|
||||||
wget \
|
wget \
|
||||||
unzip \
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
vim && \
|
|
||||||
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
|
# Install Python dependencies
|
||||||
|
RUN pip install --no-cache-dir --upgrade pip && \
|
||||||
RUN pip install --no-cache-dir -r requirements.txt
|
pip install --no-cache-dir setuptools wheel && \
|
||||||
|
pip install --no-cache-dir -r requirements.txt
|
||||||
|
|
||||||
|
# Copy the rest of the application
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
|
# Create necessary directories
|
||||||
|
RUN mkdir -p /app/videos /app/outputs
|
||||||
|
|
||||||
|
# Set volumes
|
||||||
VOLUME ["/app/videos", "/app/outputs"]
|
VOLUME ["/app/videos", "/app/outputs"]
|
||||||
|
|
||||||
|
# Set the command to run your application
|
||||||
CMD ["python", "-u", "main.py"]
|
CMD ["python", "-u", "main.py"]
|
||||||
Reference in New Issue
Block a user