Spaces:
Sleeping
Sleeping
Download Dockerfile from rmdzav/Binomial-Probability: direct link, hf CLI and curl.
- Browser
- Download file 601 Bytes
-
https://huggingface.co/spaces/rmdzav/Binomial-Probability/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/rmdzav/Binomial-Probability/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/rmdzav/Binomial-Probability/resolve/main/Dockerfile
601 Bytes
| # Gunakan base image Python yang ringan | |
| FROM python:3.9-slim | |
| # Atur direktori kerja di dalam container | |
| WORKDIR /app | |
| # Salin requirements.txt dan install library | |
| COPY requirements.txt . | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Salin semua file project ke dalam container | |
| COPY . . | |
| # Beri akses ke user non-root (Standar Keamanan Hugging Face) | |
| RUN useradd -m -u 1000 user | |
| USER user | |
| ENV HOME=/home/user \ | |
| PATH=/home/user/.local/bin:$PATH | |
| WORKDIR $HOME/app | |
| COPY --chown=user . $HOME/app | |
| # Buka port 7860 sesuai settingan app.py | |
| EXPOSE 7860 | |
| # Jalankan aplikasi | |
| CMD ["python", "app.py"] |