02 · Environment Setup
Previous: 01-OverviewNext: 03-Deployment
Install Docker, set up networking for mainland China, connect the hardware. If you don't finish this page, the next one won't run.
1. Install Docker
Skip this if it's already installed, but check first:
docker --versionIf it isn't installed:
curl -fsSL https://get.docker.com | sudo sh
sudo usermod -aG docker $USERYou must log out and back in after the last command (log out and log in again, or reboot), otherwise the docker command reports a permission error. To verify:
docker run --rm hello-world2. Configure China-region registry mirrors ⚠️ Required if you're in mainland China
Direct connections to Docker Hub from mainland China time out — without a mirror configured, you can't pull any image.
Edit /etc/docker/daemon.json (create it if it doesn't exist):
{
"registry-mirrors": [
"https://docker.m.daocloud.io",
"https://docker.1ms.run",
"https://docker.xuanyuan.me"
]
}Restart Docker:
sudo systemctl daemon-reload
sudo systemctl restart dockerVerify the mirrors are in effect:
docker info | grep -A4 "Registry Mirrors"⚠️ Many mirror addresses floating around online have stopped working (USTC, NetEase, and
dockerproxy.comhave all shut down) — don't copy from old articles. The three above were measured working as of September 2026.
3. Prepare the hardware
3.1 Wiring the robot
- Connect the SO-101 arm's servos to the computer through the USB adapter board
- Plug in the camera over USB (if using a RealSense, use a USB 3.0 port)
3.2 Serial port permissions ⚠️ Important
Without this, the container can't see the devices:
sudo usermod -aG dialout $USERThis also requires a re-login to take effect.
3.3 Confirm the devices are detected
ls /dev/ttyACM* /dev/ttyUSB* # servo serial ports
ls /dev/video* # cameraIf you can see the device nodes, the system has recognized them.
4. Configure the Hugging Face mirror ⚠️ Required in mainland China
huggingface.co is completely unreachable from mainland China, yet loading pretrained models requires it.
Add this environment variable when starting the container:
-e HF_ENDPOINT=https://hf-mirror.comscripts/run.sh already sets it by default. If you're fully offline, also add -e HF_HUB_OFFLINE=1.
Checklist
Before moving on to the next page, confirm these all pass:
docker --version # Docker installed
docker info | grep -A4 "Registry Mirrors" # mirrors active
groups | grep dialout # serial permissions configured (after re-login)
ls /dev/ttyACM* # device detectedNext: 03-Deployment — pull the image, start the container

