text-embedding-api / Dockerfile
640510702phithak's picture
Create Dockerfile
cbac7b2 verified
raw
history blame
443 Bytes
# ใช้ Python 3.9
FROM python:3.9
# ติดตั้ง dependencies
RUN pip install --no-cache-dir fastapi uvicorn transformers torch
# คัดลอกไฟล์โค้ดทั้งหมดไปยัง container
COPY app.py /app.py
# เปิดพอร์ต 7860 (ที่ HF Spaces ใช้)
EXPOSE 7860
# รัน FastAPI ด้วย Uvicorn
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]