Spaces:
Runtime error
Runtime error
Download Dockerfile from drizzymedia/Test: direct link, hf CLI and curl.
- Browser
- Download file 831 Bytes
-
https://huggingface.co/spaces/drizzymedia/Test/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/drizzymedia/Test/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/drizzymedia/Test/resolve/main/Dockerfile
831 Bytes
| FROM python:3.11-slim | |
| # Install system dependencies | |
| RUN apt-get update && apt-get install -y \ | |
| ffmpeg \ | |
| libsndfile1 \ | |
| git \ | |
| curl \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Create user for HF Spaces | |
| RUN useradd -m -u 1000 user | |
| USER user | |
| ENV HOME=/home/user \ | |
| PATH=/home/user/.local/bin:$PATH | |
| WORKDIR $HOME/app | |
| # Copy requirements and install | |
| COPY --chown=user requirements.txt . | |
| RUN pip install --no-cache-dir --upgrade -r requirements.txt | |
| # Copy application code | |
| COPY --chown=user . . | |
| # Create storage directories with correct permissions | |
| RUN mkdir -p storage/audio storage/covers storage/uploads storage/models storage/database | |
| RUN chown -R user:user storage | |
| # Expose port (HF Spaces default is 7860) | |
| EXPOSE 7860 | |
| # Run the application | |
| CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860"] | |