Wljamz18 / Dockerfile
Bl4ckSpaces's picture
Update Dockerfile
ab67bd9 verified
raw
history blame contribute delete
758 Bytes
# Gunakan Python 3.10 Slim
FROM python:3.10-slim
# Set folder kerja
WORKDIR /app
# Buat folder data & izinkan akses penuh (Wajib untuk Database SQLite)
RUN mkdir -p /app/data && chmod 777 /app/data
# Copy file requirements
COPY requirements.txt .
# 1. Update PIP
RUN pip install --no-cache-dir --upgrade pip
# 2. Install Requirements dasar
RUN pip install --no-cache-dir -r requirements.txt
# 3. [SOLUSI ERROR] PAKSA INSTALL GRADIO_CLIENT VERSI TERBARU SECARA MANUAL
# Ini akan menimpa versi lama apapun yang ada di cache Hugging Face
RUN pip install --no-cache-dir --force-reinstall "gradio_client>=1.3.0"
# Copy sisa file (main.py)
COPY . .
# Buka Port
EXPOSE 7860
# Jalankan App
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]