fastapi-wisatapas / Dockerfile
mjamalm18's picture
Update Dockerfile
5a2a2cb verified
raw
history blame contribute delete
535 Bytes
FROM python:3.10-slim
# Install sistem dependencies jika perlu (opsional untuk HF Spaces)
RUN apt-get update && apt-get install -y \
git \
&& rm -rf /var/lib/apt/lists/*
# Install Python dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir --upgrade pip
RUN pip install --no-cache-dir -r requirements.txt
# Salin semua source code + data ke container
COPY . /app
WORKDIR /app
# Jalankan uvicorn di port 7860 (wajib untuk Hugging Face Spaces)
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]