FROM python:3.10-slim # Install system dependencies (gcc untuk compile native extensions) RUN apt-get update && apt-get install -y \ gcc \ g++ \ && rm -rf /var/lib/apt/lists/* WORKDIR /app # Copy requirements dulu agar layer ini di-cache COPY requirements.txt . RUN pip3 install --no-cache-dir -r requirements.txt # Copy seluruh project COPY . . # Hugging Face Spaces menggunakan port 7860. # PIPELINE_FLAGS bisa dioverride dari Settings > Variables. ENV PORT=7860 ENV PIPELINE_FLAGS="" EXPOSE 7860 CMD ["sh", "-c", "python3 src/core/pipeline_server.py --host 0.0.0.0 --port ${PORT:-7860} ${PIPELINE_FLAGS}"]