openclaw-huggingface / Dockerfile
Atum09's picture
Upload folder using huggingface_hub
767597b verified
raw
history blame contribute delete
954 Bytes
# ============================================================
# OpenClaw on Hugging Face Spaces
# Easy AI deployment with auto-backup
# ============================================================
FROM node:22-slim
# Install system dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
python3 \
python3-pip \
curl \
git \
procps \
&& rm -rf /var/lib/apt/lists/*
# Install OpenClaw
RUN npm install -g openclaw@latest
# Install Python dependencies
RUN pip3 install --no-cache-dir requests --break-system-packages
# Create workspace directory
RUN mkdir -p /root/.openclaw/workspace
WORKDIR /app
# Copy backup script
COPY backup.py /app/backup.py
# Copy startup script
COPY start.sh /app/start.sh
# Make scripts executable
RUN chmod +x /app/start.sh /app/backup.py
# Hugging Face Spaces uses port 7860
ENV PORT=7860
# Expose port
EXPOSE 7860
# Startup command
CMD ["/bin/bash", "/app/start.sh"]