Download Dockerfile from Zurya/AI_Audio: direct link, hf CLI and curl.
- Browser
- Download file 751 Bytes
-
https://huggingface.co/spaces/Zurya/AI_Audio/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/Zurya/AI_Audio/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/Zurya/AI_Audio/resolve/main/Dockerfile
751 Bytes
| # Use a slim Python image to keep the build fast | |
| FROM python:3.9-slim | |
| # Install system dependencies for audio processing (ffmpeg is required by librosa) | |
| RUN apt-get update && apt-get install -y ffmpeg libsndfile1 | |
| WORKDIR /app | |
| # Create a user to avoid running as root (Hugging Face security requirement) | |
| RUN useradd -m -u 1000 user | |
| USER user | |
| ENV HOME=/home/user \ | |
| PATH=/home/user/.local/bin:$PATH | |
| WORKDIR $HOME/app | |
| # Copy and install Python dependencies | |
| COPY --chown=user requirements.txt . | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Copy the rest of your app code | |
| COPY --chown=user . . | |
| # Expose the default Hugging Face port | |
| EXPOSE 7860 | |
| # Start the FastAPI server | |
| CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"] |