FROM python:3.10-slim WORKDIR /app # Copy all required files (9 essential files only) COPY requirements.txt . COPY inference.py . COPY server.py . COPY tasks.py . COPY demo.py . COPY README.md . COPY openenv.yaml . COPY .gitignore . # Install dependencies RUN pip install --no-cache-dir -r requirements.txt # Set environment defaults (can be overridden at runtime) ENV API_BASE_URL="https://router.huggingface.co/v1" ENV MODEL_NAME="Qwen/Qwen2.5-72B-Instruct" # Expose port for Gradio (port 7860) EXPOSE 7860 # Health check for HF Spaces HEALTHCHECK --interval=30s --timeout=10s --start-period=5s \ CMD python -c "import urllib.request; urllib.request.urlopen('http://localhost:7860/health').status" 2>/dev/null || exit 1 # Default: run demo.py (Gradio UI) # For evaluation, inference.py can be called directly CMD ["python", "demo.py"]