FROM python:3.9 WORKDIR /app # Fix: Corrected apt-get command RUN apt-get update && apt-get install -y \ libevent-dev \ python3-dev \ build-essential \ && rm -rf /var/lib/apt/lists/* COPY requirements.txt . RUN pip install --no-cache-dir -r requirements.txt COPY . . # Ensure the folder exists and is writable by the container user RUN mkdir -p saved_music && chmod 777 saved_music EXPOSE 7860 # Use eventlet for Socket.IO compatibility CMD ["gunicorn", "--worker-class", "eventlet", "--workers", "1", "--bind", "0.0.0.0:7860", "app:app"]