Spaces:
Sleeping
Sleeping
File size: 437 Bytes
cbac7b2 b34c8f6 cbac7b2 b34c8f6 cbac7b2 b34c8f6 cbac7b2 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
# ใช้ 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"]
|