archon-dataset-sync / Dockerfile
personalbotai
Deploy Archon Dataset Sync v2.1 with branch support\n\n- Add sync_dataset.sh with DATASET_BRANCH support\n- Add Flask monitoring dashboard (app.py)\n- Add Dockerfile for HF Space deployment\n- Add comprehensive documentation\n- Security hardening (upstream protection)\n- Auto-retry with exponential backoff\n- Health checks and graceful shutdown\n\nArchon Standard: Build for Eternity
9de9a1b
raw
history blame contribute delete
993 Bytes
# 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"