Spaces:
Sleeping
Sleeping
Download Dockerfile from Ochank/Remove_BG_API: direct link, hf CLI and curl.
- Browser
- Download file 482 Bytes
-
https://huggingface.co/spaces/Ochank/Remove_BG_API/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/Ochank/Remove_BG_API/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/Ochank/Remove_BG_API/resolve/main/Dockerfile
482 Bytes
| # Gunakan Python versi 3.9 | |
| FROM python:3.9 | |
| # Buat folder kerja | |
| WORKDIR /code | |
| # Beri izin folder cache untuk AI (Penting di Hugging Face!) | |
| RUN mkdir -p /.u2net && chmod 777 /.u2net | |
| # Salin daftar belanja & install | |
| COPY ./requirements.txt /code/requirements.txt | |
| RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt | |
| # Salin kode program | |
| COPY . . | |
| # Jalankan API di port 7860 (Port wajib Hugging Face) | |
| CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"] |