uzzam24/complexity-levels-api
0
1# Hugging Face Space — all code copied into Space repo (no GitHub clone needed).2# Run sync_to_space.ps1 from project root, then git push the Space repo.3FROM python:3.11-slim4 5RUN apt-get update && apt-get install -y --no-install-recommends \6 build-essential \7 && rm -rf /var/lib/apt/lists/*8 9RUN useradd -m -u 1000 user10 11WORKDIR /app/repo12 13COPY src/deploy/backend/requirements.txt /tmp/requirements.txt14RUN pip install --no-cache-dir -r /tmp/requirements.txt huggingface_hub \15 && python -m spacy download en_core_web_sm16 17COPY --chown=user:user src/ /app/repo/18 19RUN chmod +x /app/repo/deploy/huggingface/entrypoint.sh \20 && mkdir -p /home/user/model /home/user/.cache/huggingface \21 && chown -R user:user /home/user22 23ENV MODEL_PATH=/home/user/model24ENV HF_MODEL_REPO=uzzam24/deberta-complexity-lcp25ENV APP_ROOT=/app/repo26ENV PYTHONPATH=/app/repo:/app/repo/deploy/backend27ENV PORT=786028ENV CORS_ALLOW_ALL=129ENV EAGER_LOAD_MODEL=130ENV HF_HOME=/home/user/.cache/huggingface31 32USER user33EXPOSE 786034 35CMD ["/app/repo/deploy/huggingface/entrypoint.sh"]36 