Spaces:
Sleeping
Sleeping
Download Dockerfile from 640510702phithak/text-embedding-api: direct link, hf CLI and curl.
- Browser
- Download file 437 Bytes
-
https://huggingface.co/spaces/640510702phithak/text-embedding-api/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/640510702phithak/text-embedding-api/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/640510702phithak/text-embedding-api/resolve/main/Dockerfile
437 Bytes
| # ใช้ Python 3.9 | |
| FROM python:3.9 | |
| # ติดตั้ง dependencies | |
| RUN pip install --no-cache-dir fastapi uvicorn transformers torch | |
| # ตั้งค่า cache directory ไปที่ /tmp | |
| ENV HF_HOME="/tmp" | |
| # คัดลอกไฟล์โปรเจกต์ | |
| COPY app.py /app.py | |
| # เปิดพอร์ต 7860 | |
| EXPOSE 7860 | |
| # รัน FastAPI | |
| CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"] | |