# Use the FULL Python image (contains all C++ compilers natively) FROM python:3.10 # Install FFmpeg for Voice Chats RUN apt-get update && apt-get install -y ffmpeg # Hugging Face security requirement: Run as user '1000' RUN useradd -m -u 1000 user USER user # Set up the environment paths ENV HOME=/home/user \ PATH=/home/user/.local/bin:$PATH # Move into the user's folder WORKDIR $HOME/app # Copy the requirements file and give ownership to the user COPY --chown=user requirements.txt . # Install libraries (This will work now because we have the full compilers!) RUN pip install --user --no-cache-dir -r requirements.txt # Copy the bot code COPY --chown=user main.py . # Boot the bot CMD ["python", "main.py"]