biruu-chatbot-api / Dockerfile
Ogghey's picture
Update Dockerfile
84855fd verified
raw
history blame contribute delete
539 Bytes
# Gunakan Python versi ringan
FROM python:3.10-slim
# Set direktori kerja
WORKDIR /app
# Salin file dependency
COPY requirements.txt .
# Instal dependensi
RUN pip install --no-cache-dir -r requirements.txt
# Set environment variable untuk cache huggingface ke direktori yang bisa ditulis
ENV TRANSFORMERS_CACHE=/tmp/hf
ENV HF_HOME=/tmp/hf
# Salin seluruh isi project ke container
COPY . .
# Jalankan aplikasi FastAPI dengan uvicorn di port 7860 (standar Hugging Face)
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]