FROM python:{{PYTHON_VERSION}}-slim # Install system dependencies for ML libraries RUN apt-get update && apt-get install -y --no-install-recommends \ libsndfile1 \ ffmpeg \ libavcodec-extra \ libgl1-mesa-glx \ libglib2.0-0 \ && rm -rf /var/lib/apt/lists/* WORKDIR /app # Install Python dependencies COPY requirements.txt . RUN pip install --no-cache-dir -r requirements.txt # Copy application COPY . . # Set environment ENV PYTHONUNBUFFERED=1 ENV PORT={{PORT}} EXPOSE {{PORT}} CMD ["python", "{{ENTRY_POINT}}"]