openclaw-deploy / Dockerfile
lychee
Use apt to install Python packages
77a8f68
Raw
History Blame Contribute Delete
706 Bytes
# OpenClaw on Hugging Face Spaces
FROM ghcr.io/openclaw/openclaw:latest
# 设置工作目录
WORKDIR /app
# 安装 Python Flask 和依赖(通过 apt)
USER root
RUN apt-get update && apt-get install -y \
python3-flask \
python3-requests \
python3-werkzeug \
&& rm -rf /var/lib/apt/lists/*
# 复制配置文件
COPY setup-hf-config.sh /app/setup-hf-config.sh
COPY start.sh /app/start.sh
COPY auth_gateway.py /app/auth_gateway.py
# 设置权限
RUN chmod +x /app/setup-hf-config.sh /app/start.sh && \
chmod +x /app/auth_gateway.py && \
mkdir -p /root/.openclaw
# 暴露端口(Hugging Face Spaces 使用 7860)
EXPOSE 7860
# 启动脚本
CMD ["/bin/bash", "/app/start.sh"]