diff --git a/.github/workflows/build-docs.yaml b/.github/workflows/build-docs.yaml index 7985db5..e83d30f 100644 --- a/.github/workflows/build-docs.yaml +++ b/.github/workflows/build-docs.yaml @@ -14,7 +14,7 @@ jobs: steps: - name: Install sphinx-rtd-theme - run: pip install sphinx-rtd-theme + run: pip install sphinx-rtd-theme myst-parser - name: Install node so that custom actions work. run : apt-get update && apt-get --yes install nodejs git diff --git a/.gitignore b/.gitignore index 0d22318..a8cdd0b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ docs/build/ -.vscode \ No newline at end of file +.vscode +.aider* diff --git a/README.md b/README.md index 141aeb2..62d3c90 100644 --- a/README.md +++ b/README.md @@ -16,13 +16,40 @@ This SDK was tested using Ubuntu 22.04 and an Nvidia GPU. UI features like 3D worlds (gazebo simulation) were tested with Nvidia GPUs using CDI passthrough. Machine-learning features like image recognition are expected to only work with NVIDIA GPUs. -We use VSCode as the default IDE, and we use [Copier](https://copier.readthedocs.io/en/stable/#installation) to -manage project templates. +We use VSCode as the default IDE, and we use Copier to manage project templates. ### Installing Docker As per the [official Docker documentation](https://docs.docker.com/engine/install/). +```bash +#Uninstall any older docker packages +for pkg in docker.io docker-doc docker-compose docker-compose-v2 podman-docker containerd runc; do sudo apt-get remove $pkg; done + +# Add Docker's official GPG key: +sudo apt-get update +sudo apt-get install ca-certificates curl +sudo install -m 0755 -d /etc/apt/keyrings +sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc +sudo chmod a+r /etc/apt/keyrings/docker.asc + +# Add the repository to Apt sources: +echo \ + "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \ + $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \ + sudo tee /etc/apt/sources.list.d/docker.list > /dev/null +sudo apt-get update + +#Install latest docker +sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin + +#Allow current user to use docker without sudo +sudo groupadd docker +sudo usermod -aG docker $USER +#Reload the group +newgrp docker +``` + ### Installing Copier As per the [official Copier documentation](https://copier.readthedocs.io/en/stable/#installation) @@ -46,11 +73,19 @@ sudo dpkg -i /tmp/vscode.deb ### Installing nvidia-container-toolkit -We recomend following the [offical guide](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-guide.html) to install the nvidia-container-toolkit. +As per the [offical nvidia-container-toolkit guide](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-guide.html). -Make sure you run `sudo nvidia-ctk runtime configure --runtime=docker` and `sudo systemctl restart docker`. - -When installed correctly you should see your gpu available in `nvidia-ctk cdi list`. +```bash +curl -fsSL https://nvidia.github.io/libnvidia-container/gpgkey | sudo gpg --dearmor -o /usr/share/keyrings/nvidia-container-toolkit-keyring.gpg \ + && curl -s -L https://nvidia.github.io/libnvidia-container/stable/deb/nvidia-container-toolkit.list | \ + sed 's#deb https://#deb [signed-by=/usr/share/keyrings/nvidia-container-toolkit-keyring.gpg] https://#g' | \ + sudo tee /etc/apt/sources.list.d/nvidia-container-toolkit.list +sudo apt-get update +sudo apt-get install -y nvidia-container-toolkit +sudo nvidia-ctk runtime configure --runtime=docker +sudo nvidia-ctk cdi generate --output=/etc/cdi/nvidia.yaml +nvidia-ctk cdi list +``` ## Quickstart @@ -81,3 +116,6 @@ ROS1 is considered end of life. It's recomended to use a ROS2 template instead * ROS2 template We're working on it... + + + diff --git a/docs/source/index.rst b/docs/source/index.rst index b58cd6d..9b79b1e 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -11,6 +11,7 @@ Welcome to spiri-sdk's documentation! :caption: Contents: .. include:: ../../README.md + :parser: myst_parser.sphinx_ Indices and tables ==================