GLM2 / Dockerfile
jemboutireng's picture
Create Dockerfile
64ef23f verified
Raw
History Blame Contribute Delete
629 Bytes
FROM python:3.10-slim
# System deps
RUN apt-get update && apt-get install -y --no-install-recommends \
git \
libglib2.0-0 \
libsm6 \
libxext6 \
libxrender-dev \
libgl1 \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
# Clone private repo
RUN --mount=type=secret,id=HF_TOKEN \
git clone https://user:$(cat /run/secrets/HF_TOKEN)@huggingface.co/jemboutireng/GLM-OCR-CALLBACK .
# Install Python deps
RUN pip install --no-cache-dir -r requirements.txt
# HuggingFace Spaces port
EXPOSE 7860
# Jalankan pakai Uvicorn
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860", "--workers", "2"]