FROM python:3.12-slim # Install system dependencies RUN apt-get update && apt-get install -y \ ffmpeg \ curl \ ca-certificates \ && rm -rf /var/lib/apt/lists/* # Set working directory WORKDIR /app # Install Python packages RUN pip install --no-cache-dir \ flask \ "yt-dlp[default]" \ curl_cffi # Copy your application COPY . . # Create streams directory RUN mkdir -p /app/streams # Set permissions RUN chmod -R 777 /app # Expose Flask port EXPOSE 7860 # Start the Flask application CMD ["python", "server.py"]