# Hugging Face Space — all code copied into Space repo (no GitHub clone needed). # Run sync_to_space.ps1 from project root, then git push the Space repo. FROM python:3.11-slim RUN apt-get update && apt-get install -y --no-install-recommends \ build-essential \ && rm -rf /var/lib/apt/lists/* RUN useradd -m -u 1000 user WORKDIR /app/repo COPY src/deploy/backend/requirements.txt /tmp/requirements.txt RUN pip install --no-cache-dir -r /tmp/requirements.txt huggingface_hub \ && python -m spacy download en_core_web_sm COPY --chown=user:user src/ /app/repo/ RUN chmod +x /app/repo/deploy/huggingface/entrypoint.sh \ && mkdir -p /home/user/model /home/user/.cache/huggingface \ && chown -R user:user /home/user ENV MODEL_PATH=/home/user/model ENV HF_MODEL_REPO=uzzam24/deberta-complexity-lcp ENV APP_ROOT=/app/repo ENV PYTHONPATH=/app/repo:/app/repo/deploy/backend ENV PORT=7860 ENV CORS_ALLOW_ALL=1 ENV EAGER_LOAD_MODEL=1 ENV HF_HOME=/home/user/.cache/huggingface USER user EXPOSE 7860 CMD ["/app/repo/deploy/huggingface/entrypoint.sh"]