SO-ARM100/101 Install Lerobot Environment

From Waveshare Wiki
Jump to: navigation, search

Install Lerobot Environment

Working with Jetson Orin Nano

You need to install environments such as pytorch and torchvision based on your CUDA version.

1. Install Miniconda

wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-aarch64.sh
chmod +x Miniconda3-latest-Linux-aarch64.sh
./Miniconda3-latest-Linux-aarch64.sh
source ~/.bashrc
  • Close and reopen the terminal to ensure the conda environment takes effect.


2. Create and activate a new Conda environment for LeRobot

conda create -y -n lerobot python=3.10 && conda activate lerobot


3. Clone the LeRobot repository

git clone https://github.com/huggingface/lerobot.git ~/lerobot


4. Install ffmpeg in the environment when using miniconda

conda install ffmpeg -c conda-forge
  • If there is an encoder problem after installation, explicitly install the specified version:
conda install ffmpeg=7.1.1 -c conda-forge


5. Installing the Lerobot with Feetech motor dependencies

cd ~/lerobot && pip install -e ".[feetech]"
  • If the download is always interrupted due to connection timeout, you can temporarily specify the image source to install:
cd ~/lerobot && pip install -e ".[feetech]" -i https://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com


6. Install PyTorch and torchvision

  • You need to install environments such as pytorch and torchvision based on your CUDA version. You can check the CUDA version using the following command:
nvcc -V
  • Check the installation commands at PyTorch official website. Taking CUDA 12.6 as an example, you can use the following installation commands:
pip install torch==2.9.0 torchvision==0.24.0 torchaudio==2.9.0 --index-url https://download.pytorch.org/whl/cu126
  • Verify installation: Need to check in Python
python
import torch
print(torch.cuda.is_available())

If the output is True, it means normal (with GPU support). Execute exit() to exit the Python command environment.
SO-ARM10X-verify CUDA acceleration.png


7. Install OpenCV dependencies

conda install -y -c conda-forge "opencv>=4.10.0.84"  # Install OpenCV and other dependencies through conda, only applicable to Jetson Jetpack 6.0+
conda remove opencv  # Uninstall OpenCV
pip3 install opencv-python==4.10.0.84  # Install the specified version of OpenCV using pip3


SO-ARM100/101 Tutorials