text-embedding-api / Dockerfile
640510702phithak's picture
Update Dockerfile
b34c8f6 verified
raw
history blame contribute delete
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"]