# Use official Python slim image FROM python:3.10-slim # Set working directory WORKDIR /app # Set environment variables ENV PIP_ROOT_USER_ACTION=ignore ENV MUSIC_COMPOSER_BASE_PATH=/tmp ENV OUTPUT_WAV=/tmp/output.wav ENV IS_DOCKER=True ENV SERVER_PORT=7860 ENV HOME=/root ENV NEW_STATIC_PATH=/tmp COPY requirements-system.txt . # Install OS-level dependencies RUN apt-get update && \ xargs apt-get install -y --no-install-recommends < /app/requirements-system.txt && \ rm -rf /var/lib/apt/lists/* # Install Python dependencies COPY requirements.txt . RUN pip install --upgrade pip RUN pip install --no-cache-dir --force-reinstall -r requirements.txt # Copy app code COPY . . # Expose app port EXPOSE 7860 # Run the app CMD ["python", "main.py"]