Add PWM-based servo control skill for RDK nodes with hardware servo support. Changes: - Add taiyang skill with SKILL.md and servo_dance.py script - Update Dockerfile and Containerfile to include taiyang skill - Update SOUL.md with skill constraints documentation The skill controls two servos via /sys/class/pwm interface and must run on node side only. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
53 lines
1.8 KiB
Docker
53 lines
1.8 KiB
Docker
FROM dcloud-registry.cn-beijing.cr.aliyuncs.com/dcloud/rdk-claw
|
|
|
|
USER root
|
|
|
|
RUN set -eux; \
|
|
if ! getent group 1001 >/dev/null; then groupadd -g 1001 user; fi; \
|
|
if ! id -u 1001 >/dev/null 2>&1; then useradd -m -u 1001 -g 1001 -s /bin/bash user; fi
|
|
|
|
RUN curl -fsSL https://github.com/krallin/tini/releases/download/v0.19.0/tini-static -o /usr/local/bin/tini \
|
|
&& chmod +x /usr/local/bin/tini
|
|
|
|
RUN apt-get update \
|
|
&& apt-get install -y --no-install-recommends socat \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
RUN curl -fsSL https://skillhub-1388575217.cos.ap-guangzhou.myqcloud.com/install/install.sh | bash
|
|
RUN cp /root/.local/bin/skillhub /usr/local/bin/skillhub \
|
|
&& chmod +x /usr/local/bin/skillhub
|
|
|
|
RUN set -eux; \
|
|
mkdir -p /workspace/default /home/user/.openclaw/identity /run/e2b; \
|
|
chmod 1777 /workspace/default /run/e2b; \
|
|
chown -R 1001:1001 /home/user /workspace/default
|
|
|
|
RUN ln -sfn /workspace/default/.openclaw /home/user/.openclaw
|
|
|
|
RUN cat > /usr/local/bin/gateway-watchdog.sh <<'EOF' && chmod +x /usr/local/bin/gateway-watchdog.sh
|
|
#!/usr/bin/env bash
|
|
set -uo pipefail
|
|
|
|
while true; do
|
|
echo "[watchdog] starting gateway..."
|
|
OUTPUT="$(openclaw gateway --allow-unconfigured 2>&1)"
|
|
EXIT_CODE=$?
|
|
[ -n "$OUTPUT" ] && printf "%s\n" "$OUTPUT"
|
|
echo "[watchdog] gateway exited with code ${EXIT_CODE}, restart in 2s"
|
|
sleep 2
|
|
done
|
|
EOF
|
|
|
|
COPY rdk-claw/SOUL.md /app/docs/reference/templates/SOUL.md
|
|
COPY rdk-claw/IDENTITY.md /app/docs/reference/templates/IDENTITY.md
|
|
COPY rdk-claw/node-remote-connect /app/skills/node-remote-connect
|
|
COPY rdk-claw/taiyang /app/skills/taiyang
|
|
RUN chown -R 1001:1001 /app/skills/node-remote-connect
|
|
RUN chown -R 1001:1001 /app/skills/taiyang
|
|
|
|
ENV HOME=/home/user
|
|
USER 1001:1001
|
|
|
|
ENTRYPOINT ["docker-entrypoint.sh"]
|
|
CMD ["/usr/local/bin/tini", "--", "/usr/local/bin/gateway-watchdog.sh"]
|