FROM ghcr.io/openclaw/openclaw:latest USER root # Kill the HuggingClaw health-check daemon that causes Space pauses RUN rm -f /etc/cron.d/*health* /etc/cron.d/*hc* 2>/dev/null; \ rm -f /usr/local/bin/*health* /usr/local/bin/*hc* 2>/dev/null; \ pkill -f health 2>/dev/null; \ echo "Health daemon removed" # Install Ollama + deps RUN apt-get update && apt-get install -y curl nginx zstd cron procps git && rm -rf /var/lib/apt/lists/* RUN curl -fsSL https://ollama.com/install.sh | sh # Install huggingface_hub for model download RUN pip install --no-cache-dir huggingface_hub RUN printf 'server {\n listen 7860;\n location / {\n proxy_pass http://127.0.0.1:8080;\n proxy_http_version 1.1;\n proxy_set_header Upgrade $http_upgrade;\n proxy_set_header Connection "upgrade";\n proxy_set_header Host $host;\n }\n}\n' > /etc/nginx/sites-available/default WORKDIR /app COPY . . RUN chmod +x start.sh EXPOSE 7860 CMD ["/app/start.sh"]