Spaces:
Sleeping
Sleeping
Download Dockerfile from ihhereanth/ENContextV1: direct link, hf CLI and curl.
- Browser
- Download file 623 Bytes
-
https://huggingface.co/spaces/ihhereanth/ENContextV1/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/ihhereanth/ENContextV1/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/ihhereanth/ENContextV1/resolve/main/Dockerfile
623 Bytes
| FROM python:3.11-slim | |
| RUN useradd -m -u 1000 user # Spaces รันคอนเทนเนอร์ด้วย UID 1000 | |
| WORKDIR /home/user/app | |
| COPY --chown=user requirements.txt . | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| COPY --chown=user app/ ./app/ | |
| USER user | |
| # ✅ แก้ไข HF_HOME ให้อยู่ใน /home/user เพื่อป้องกัน PermissionError | |
| ENV HOME=/home/user \ | |
| PATH=/home/user/.local/bin:$PATH \ | |
| HF_HOME=/home/user/hf_cache \ | |
| PYTHONUNBUFFERED=1 | |
| EXPOSE 7860 | |
| CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860", "--workers", "2"] |