QuickDish / Dockerfile
Thiophai's picture
Create Dockerfile
b966890 verified
Raw
History Blame Contribute Delete
601 Bytes
# ใช้ Python 3.11 เป็น Base Image
FROM python:3.11
# กำหนด Working Directory
WORKDIR /app
# คัดลอกไฟล์ requirements.txt และติดตั้ง dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# คัดลอกโค้ดทั้งหมดไปยัง container
COPY . .
# กำหนดค่า Environment Variables (ดึงจาก Hugging Face)
ENV OPENAI_API_KEY=${OPENAI_API_KEY}
# รัน API ด้วย Uvicorn
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]