SIO Setup Tutorial (Docker)¶
This document walks through the steps required to run SIO Docker image on Ubuntu
Step 1: Ubuntu Upgrades¶
-
Start with updating and upgrading Ubuntu packages
Step 2: NVIDIA GPU Drivers Installation¶
-
Try the following command before continuing with the GPU driver installation instructions to see if they're already installed on the system:
-
If the command worked it will show an output similar to the following. If so, skip to Step 3.
-
Follow the instructions on the driver web page: Advanced Driver Search official NVIDIA drivers.
-
Below is an example taken from installation instructions for a RTX 3060 GPU.
-
Once you have downloaded the driver, change to the directory containing the driver package and install the driver by running, as root,
-
-
Reboot system
-
After the reboot, make sure the GPU drivers were successfully installed by running the following command:
Step 3: Docker Installation¶
-
Install the Docker Engine by following the instructions on Docker's website, or use the following commands. If you run into any issues, Docker's page may have troubleshooting info that can help.
-
Uninstall any previous installations
-
Update and install required packages for Ubuntu
-
Add Docker GPG key
-
Repository setup
-
Install Docker
-
To verify if the installation worked try the following
-
To use Docker commands without sudo
-
The terminal needs to be restarted for this to take effect, I prefer a reboot
-
Verify you can run commands without sudo
Step 4: NVIDIA Container Toolkit¶
-
This allows Docker to use the installed GPU. Full documentation can be found on NVIDIA's Installation Guide.
-
Setup package repository and GPG key
distribution=$(. /etc/os-release;echo $ID$VERSION_ID) \ && 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/$distribution/libnvidia-container.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
-
Install nvidia-docker2
-
Restart Docker
-
To verify if the GPU can be used with Docker
Step 5: Get SIO Docker Image¶
-
The SIO docker image can be obtained from our private registry, once we've created an account for you and provided you with
sighthound-keyfile.json
: -
At the end of the command above,
r241127
represents the release that can be changed depending on the current release version. Latest release as of November 27, 2024 wasr241127
. -
More details are available at Working with SIO framework.
Step 6: Run SIO pipelines¶
-
Here’s an example that uses the GPU and runs the folder watcher pipeline with the Docker image that we pulled in Step 4.
docker run -it --gpus all --rm \ -v /data:/data \ -e SIO_DATA_DIR=/data \ us-central1-docker.pkg.dev/ext-edge-analytics/docker/sio:r241127 \ /sighthound/sio/bin/runPipeline \ /sighthound/sio/share/pipelines/VehicleAnalytics/VehicleAnalyticsFolderWatch.yaml \ folderPath=/data/watchedFolder \ --license-path /data/sighthound-license
-
More details are available at Working with SIO framework.