File size: 648 Bytes
2853955 ed75af9 ec6856a ed75af9 352b302 ec6856a ed75af9 352b302 ec6856a ed75af9 3a26835 ed75af9 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | FROM python:3.10-slim
# Set working directory
WORKDIR /app
# Install dependencies yang dibutuhkan sistem
RUN apt-get update && apt-get install -y \
curl \
unzip \
libsndfile1 \
ffmpeg \
&& rm -rf /var/lib/apt/lists/*
# Salin file dan install Python dependencies
COPY requirements.txt requirements.txt
RUN pip install --no-cache-dir -r requirements.txt
# Salin semua kode ke container
COPY . .
# Set env buat SudachiPy
ENV SUDACHIDICT_DIR=/usr/local/lib/python3.10/dist-packages/sudachidict_core
# Port yang dibuka
EXPOSE 7860
# Jalankan FastAPI pakai Uvicorn
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"] |