diff --git a/Dockerfile b/Dockerfile index 3f53ada..7247f3c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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 + +# 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"] diff --git a/GUI/backgrounds.html b/GUI/backgrounds.html index 541e39f..f13dc3d 100644 --- a/GUI/backgrounds.html +++ b/GUI/backgrounds.html @@ -1,263 +1,210 @@ -{% extends "layout.html" %} -{% block main %} - - -