# Archon HF Space Dockerfile # Base image: Python 3.11 slim with bash FROM python:3.11-slim # Install system dependencies RUN apt-get update && apt-get install -y \ git \ bash \ curl \ procps \ && rm -rf /var/lib/apt/lists/* # Set working directory WORKDIR /app # Copy Python dependencies COPY requirements.txt . RUN pip install --no-cache-dir -r requirements.txt # Copy application files COPY sync_dataset.sh . COPY app.py . COPY README.md . # Make sync script executable RUN chmod +x sync_dataset.sh # Create picoclaw home directory RUN mkdir -p /data/.picoclaw # Environment variables ENV PICOCLAW_HOME=/data/.picoclaw ENV PYTHONUNBUFFERED=1 # Expose port for Flask EXPOSE 7860 # Health check HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \ CMD python -c "import psutil; print('OK')" || exit 1 # Start both sync daemon and Flask app CMD bash -c "nohup ./sync_dataset.sh > /dev/null 2>&1 & exec gunicorn --bind 0.0.0.0:7860 app:app"