From fd57390bf349a0fd5e91b8f275408a88e4313da2 Mon Sep 17 00:00:00 2001 From: Rooholla-KhorramBakht <38699860+Rooholla-KhorramBakht@users.noreply.github.com> Date: Fri, 10 Jan 2025 21:21:03 -0500 Subject: [PATCH 1/2] Update setup.md --- docs/setup.md | 59 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) diff --git a/docs/setup.md b/docs/setup.md index 8a1c1f8..e456f6b 100644 --- a/docs/setup.md +++ b/docs/setup.md @@ -99,6 +99,65 @@ Finally, update the and upgrade: sudo apt update sudo apt upgrade ``` +### Installing CUDA +To use the onboard GPU we need to install the CUDA toolkit for Jetson [here](https://developer.nvidia.com/cuda-11-8-0-download-archive?target_os=Linux&target_arch=aarch64-jetson&Compilation=Native&Distribution=Ubuntu&target_version=20.04&target_type=deb_local). Specifically: + +``` +wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/arm64/cuda-ubuntu2004.pin +sudo mv cuda-ubuntu2004.pin /etc/apt/preferences.d/cuda-repository-pin-600 +wget https://developer.download.nvidia.com/compute/cuda/11.8.0/local_installers/cuda-tegra-repo-ubuntu2004-11-8-local_11.8.0-1_arm64.deb +sudo dpkg -i cuda-tegra-repo-ubuntu2004-11-8-local_11.8.0-1_arm64.deb +sudo cp /var/cuda-tegra-repo-ubuntu2004-11-8-local/cuda-*-keyring.gpg /usr/share/keyrings/ +sudo apt-get update +sudo apt-get -y install cuda-11-8 +``` +Additionally, we also need to install the following packages for successful CUDA kernel compilation in our projects: +``` +sudo apt install -y libcudnn8-dev libcusolver-dev-11-8 libcublas-dev-11-8 libcublas-11-8 libcusparse-11-8 libcusparse-dev-11-8 +``` +In order to install Torch, we need to know what Jetpack revision we have. You can check it out through the following command: +``` +dpkg-query --show nvidia-l4t-core +``` +### Installing Conda +Simply run the following commands to install Conda: + +```bash +sudo chown $USER /opt +wget https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-Linux-aarch64.sh -O ~/miniconda.sh +/bin/bash ~/miniconda.sh -b -p /opt/conda +rm ~/miniconda.sh +sudo ln -s /opt/conda/etc/profile.d/conda.sh /etc/profile.d/conda.sh +echo ". /opt/conda/etc/profile.d/conda.sh" >> ~/.bashrc +echo "conda activate base" >> ~/.bashrc +``` + +Now create a virtual environment for the deployment of the RL policies available in Go2Py: + +```bash +conda create --name rl-deploy python==3.8.10 +conda activate rl-deploy +``` + +Finally, install the deep learning libraries needed for the deployments: + +####Pytorch +Download and install appropriate version as described [here](https://forums.developer.nvidia.com/t/pytorch-for-jetson/72048): + +```bash +cd ~ +wget https://developer.download.nvidia.cn/compute/redist/jp/v512/pytorch/torch-2.1.0a0+41361538.nv23.06-cp38-cp38-linux_aarch64.whl torch-2.1.0a0+41361538.nv23.06-cp38-cp38-linux_aarch64.whl +python -m pip install torch-2.1.0a0+41361538.nv23.06-cp38-cp38-linux_aarch64.whl +# Install warp-lang if required +pip install https://github.com/NVIDIA/warp/releases/download/v1.5.1/warp_lang-1.5.1+cu11-py3-none-manylinux2014_aarch64.whl +``` +If successful, the following check should return true: + +```python +import torch +print(torch.cuda.is_available()) +``` + ### Robot Now tell the computer on the robot to use the internet shared by the host computer. SSH into the robot's computer with IP address `192.168.123.18`, username `unitree`, and password `123`. Note that the host computer's IP range should have already been set to static mode with an IP in the `192.168.123.x` range where x is anything except IPs already used by the others (e.g. `.18`). From 34c2153f077e6796b8c50108107fbe443dcb32a2 Mon Sep 17 00:00:00 2001 From: Rooholla-KhorramBakht <38699860+Rooholla-KhorramBakht@users.noreply.github.com> Date: Fri, 10 Jan 2025 22:00:32 -0500 Subject: [PATCH 2/2] Update setup.md --- docs/setup.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/setup.md b/docs/setup.md index e456f6b..6a6cecb 100644 --- a/docs/setup.md +++ b/docs/setup.md @@ -100,6 +100,7 @@ sudo apt update sudo apt upgrade ``` ### Installing CUDA + To use the onboard GPU we need to install the CUDA toolkit for Jetson [here](https://developer.nvidia.com/cuda-11-8-0-download-archive?target_os=Linux&target_arch=aarch64-jetson&Compilation=Native&Distribution=Ubuntu&target_version=20.04&target_type=deb_local). Specifically: ``` @@ -120,6 +121,7 @@ In order to install Torch, we need to know what Jetpack revision we have. You ca dpkg-query --show nvidia-l4t-core ``` ### Installing Conda + Simply run the following commands to install Conda: ```bash @@ -141,7 +143,7 @@ conda activate rl-deploy Finally, install the deep learning libraries needed for the deployments: -####Pytorch +#### DL Frameworks Download and install appropriate version as described [here](https://forums.developer.nvidia.com/t/pytorch-for-jetson/72048): ```bash