FROM ollama/ollama:latest # Evitar prompts interactivos de apt (como tzdata) que cuelgan el build en HF ENV DEBIAN_FRONTEND=noninteractive ENV TZ=Etc/UTC USER root # Instalación optimizada en un solo RUN para ver logs claros y evitar bloqueos RUN apt-get update && \ apt-get install -y --no-install-recommends \ curl git python3 python3-pip tzdata ca-certificates && \ curl -fsSL https://deb.nodesource.com/setup_22.x | bash - && \ apt-get install -y nodejs && \ npm install -g pnpm && \ pip install huggingface_hub --break-system-packages --no-cache-dir && \ apt-get clean && \ rm -rf /var/lib/apt/lists/* # Clonar y construir OpenClaw RUN git clone https://github.com/openclaw/openclaw /app WORKDIR /app # Instalación de dependencias y Pre-build RUN pnpm install # Configuración de ejecución COPY start.sh /start.sh RUN chmod +x /start.sh # Puerto requerido por Hugging Face EXPOSE 7860 ENV PORT=7860 ENTRYPOINT ["/bin/bash", "/start.sh"]