FROM ubuntu:22.04 # Stop apt from asking questions during install ENV DEBIAN_FRONTEND=noninteractive # 1. Install system Python, libtorrent, and tools directly from Ubuntu repo RUN apt-get update && apt-get install -y \ python3 \ python3-pip \ python3-libtorrent \ curl \ gnupg \ && rm -rf /var/lib/apt/lists/* # 2. Install playit.gg background agent WORKDIR /app COPY . . # 3. Install Python requirements via pip3 RUN pip3 install --no-cache-dir flask requests huggingface_hub # 4. Clean up start script endings and make executable RUN sed -i 's/\r$//' start.sh && chmod +x start.sh CMD ["bash", "start.sh"]