Spaces:
Runtime error

MatcheringAI / Dockerfile
Shaunwg's picture
Create Dockerfile
7181682 verified
Raw History Blame Contribute Delete
945 Bytes
# Use a base Python image with a specific version
FROM python:3.10-slim-buster
# Install system dependencies: ffmpeg and libsndfile1
# ffmpeg is crucial for matchering to handle various audio formats (mp3, flac, ogg, etc.)
# libsndfile1 is often a dependency for sound processing libraries like SoundFile, which matchering uses.
RUN apt-get update && apt-get install -y ffmpeg libsndfile1 && rm -rf /var/lib/apt/lists/*
# Create a non-root user and set working directory to avoid permission issues
RUN useradd -m -u 1000 user
WORKDIR /app
USER user
# Copy requirements.txt and install Python dependencies
COPY --chown=user:user requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy your application code
COPY --chown=user:user . .
# Expose the port your application will listen on (Hugging Face Spaces expects 7860 by default for Gradio)
EXPOSE 7860
# Command to run your Gradio application
CMD ["python", "app.py"]