Spaces:
Runtime error
Runtime error
Download Dockerfile from FarelDeveloper/music: direct link, hf CLI and curl.
- Browser
- Download file 606 Bytes
-
https://huggingface.co/spaces/FarelDeveloper/music/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/FarelDeveloper/music/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/FarelDeveloper/music/resolve/main/Dockerfile
606 Bytes
| # Gunakan image python standar tanpa slim agar dependensi sistem sudah lengkap | |
| FROM python:3.10 | |
| WORKDIR /app | |
| # Set env agar log python langsung keluar | |
| ENV PYTHONUNBUFFERED=1 | |
| # Buat user non-root sesuai aturan HF | |
| RUN useradd -m -u 1000 user | |
| USER user | |
| ENV PATH="/home/user/.local/bin:${PATH}" | |
| # Copy requirements & install | |
| COPY --chown=user:user requirements.txt . | |
| RUN pip install --no-cache-dir --user --upgrade pip && \ | |
| pip install --no-cache-dir --user -r requirements.txt | |
| # Copy sisa kode | |
| COPY --chown=user:user . . | |
| EXPOSE 7860 | |
| CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"] |