Spaces:
Sleeping
Sleeping
| # 1. Start with the official Python 3.12 slim base image | |
| FROM python:3.12-slim | |
| # 2. Set the working directory inside the container | |
| WORKDIR /app | |
| # 3. Install system dependencies | |
| # This step updates the package lists and installs FluidSynth | |
| RUN apt-get update && apt-get install -y fluidsynth && \ | |
| # Clean up the apt cache to keep the image size small | |
| rm -rf /var/lib/apt/lists/* | |
| # 4. Copy the requirements file | |
| COPY requirements.txt . | |
| # 5. Install Python packages | |
| # --no-cache-dir ensures we don't store the download cache, keeping the image small | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # 6. Copy all your application files (app.py, README.md, etc.) | |
| # IMPORTANT: You must have 'timbres_of_heaven.sf2' in this directory | |
| # when you build the image so it gets copied too! | |
| COPY . . | |
| # 7. Expose the default Gradio port | |
| EXPOSE 7860 | |
| # 8. Define the command to run your application | |
| # We will modify app.py to listen on 0.0.0.0 | |
| CMD ["python", "app.py"] |