Spaces:
Sleeping
Sleeping
| # Use the official Python 3.10 image | |
| FROM python:3.10 | |
| # Set the working directory | |
| WORKDIR /code | |
| # CRITICAL FIX: Install FFmpeg into the Linux container so Demucs can read MP3s | |
| RUN apt-get update && apt-get install -y ffmpeg | |
| # Copy the requirements file and install dependencies | |
| COPY ./requirements.txt /code/requirements.txt | |
| RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt | |
| # Copy your application code | |
| COPY . /code | |
| # Create the uploads and separated directories so Demucs has permission to write | |
| RUN mkdir -p /code/uploads /code/separated | |
| RUN chmod -R 777 /code/uploads /code/separated | |
| # Start the FastAPI server | |
| CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"] |