Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
69 changes: 62 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,67 @@
FROM python:3.10.14-slim

RUN apt update
RUN apt-get install -y ffmpeg
RUN apt install python3-pip -y
# Set environment variables
ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1
ENV REDDIT_BOT_GUI=true

RUN mkdir /app
ADD . /app
# Install system dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
ffmpeg \
curl \
wget \
gnupg \
libglib2.0-0 \
libnss3 \
libnspr4 \
libatk1.0-0 \
libatk-bridge2.0-0 \
libcups2 \
libdrm2 \
libdbus-1-3 \
libxcb1 \
libxkbcommon0 \
libx11-6 \
libxcomposite1 \
libxdamage1 \
libxext6 \
libxfixes3 \
libxrandr2 \
libgbm1 \
libpango-1.0-0 \
libcairo2 \
libasound2 \
libatspi2.0-0 \
&& rm -rf /var/lib/apt/lists/*

# Create app directory
WORKDIR /app
RUN pip install -r requirements.txt

CMD ["python3", "main.py"]
# Copy requirements first for better caching
COPY requirements.txt .

# Install Python dependencies
RUN pip install --no-cache-dir -r requirements.txt

# Install Playwright browsers
RUN playwright install chromium
RUN playwright install-deps chromium

# Download spaCy language model
RUN python -m spacy download en_core_web_sm
Comment on lines +50 to +51
Copy link

Copilot AI Feb 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The spacy model download in the Dockerfile doesn't verify if the download was successful. If the download fails silently, the application may crash at runtime when trying to use the model. Consider adding error checking after the download command.

Suggested change
# Download spaCy language model
RUN python -m spacy download en_core_web_sm
# Download spaCy language model and verify it can be loaded
RUN python -m spacy download en_core_web_sm && \
python -c "import spacy; spacy.load('en_core_web_sm')"

Copilot uses AI. Check for mistakes.

# Copy application code
COPY . .

# Create necessary directories
RUN mkdir -p assets/temp assets/backgrounds/video assets/backgrounds/audio results

# Expose ports
EXPOSE 5000

# Set entrypoint
COPY docker-entrypoint.sh /docker-entrypoint.sh
RUN chmod +x /docker-entrypoint.sh

ENTRYPOINT ["/docker-entrypoint.sh"]
CMD ["python", "main.py"]
Loading
Loading