# Dockerfile used by HF Spaces (SDK: docker). # HF Spaces conventions: # - listen on 0.0.0.0:7860 # - run as a non-root UID 1000 # # Runtime env (set via Space "Secrets / Variables"): # HF_TOKEN write token (secret) — used to push reviews # REVIEW_DATASET_REPO e.g. VCLab-PolyU/omnistg-reviews # ANNO_REVIEWS_TARGET default 3 (each annotation needs N reviews) FROM python:3.11-slim ENV PYTHONDONTWRITEBYTECODE=1 \ PYTHONUNBUFFERED=1 \ PIP_DISABLE_PIP_VERSION_CHECK=1 WORKDIR /app COPY requirements.txt . RUN pip install --no-cache-dir -r requirements.txt COPY scripts ./scripts COPY templates ./templates COPY static ./static COPY data ./data # Make data writable for local fallback (data/local_reviews/). RUN mkdir -p /app/data/local_reviews && chmod -R 777 /app/data EXPOSE 7860 CMD ["uvicorn", "scripts.web:app", "--host", "0.0.0.0", "--port", "7860"]