General Installation
info
If you have an ATS kit (LPU with SENSR-I pre-installed), you may skip this procedure.
caution
Make sure you have an active internet connection during the installation process.
Pre-requisites
By default, SENSR operates on Ubuntu 20.04 LTS. The following packages are required.
Master node machine
(The machine can be used as both the Master node and Algo node.)
Graphics drivers
mesa-utils
(>= 8.4.0-1) | forAMD64
architecture without GPUsudo apt update && sudo apt install mesa-utils -y && sudo reboot
nvidia-driver-525
| forAMD64
architecture with GPUsudo apt update && sudo apt install nvidia-driver-535 -y && sudo prime-select nvidia && sudo reboot
# It is recommended to enter the following command to prevent the 'apt' operation from changing the driver version:
sudo apt-mark hold nvidia-driver-525 libnvidia-compute-525
Algo node machine
(You can skip this step if running the master and algo nodes on the same machine.)
Common
openssh-server
(>= 1:8.2p1-4ubuntu0.5)sudo apt update && sudo apt install openssh-server -y
Graphics drivers
nvidia-driver-525
| forAMD64
architecture with GPUsudo apt update && sudo apt install nvidia-driver-525 -y && sudo reboot
# It is recommended to enter the following command to prevent the 'apt' operation from changing the driver version:
sudo apt-mark hold nvidia-driver-525 libnvidia-compute-525
Installation
Download
sr-launcher-cli-[VERSION]-[ARCH].deb
.Install the downloaded file with command below.
sudo apt install ./sr-launcher-cli-[VERSION]-[ARCH].deb
(Optional) Set version to use. Default version is
latest
.sr-launcher-cli set version -v [Version]
# Versions available can be seen using sr-launcher-cli set version and navigating the list.Pre-install packages. It will download Kubernetes binary and Docker images of SENSR-I to the machine you are running SR Launcher CLI.
sr-launcher-cli run pre-install
# By default all images for both arm64 and amd64 will be downloaded. You can select a specific architecture as follows:
# sr-launcher-cli run pre-install -a amd64Create a
cluster.json
file containing the host information for the machines to use. More details about the cluster can be found hereCase 1: Single machine installation, which Master node and Algo node will be in the same machine
{
"nodes": [
{
"ip": "ip-of-the-machine",
"user_name": "user-name-of-the-machine",
"password": "password-of-the-machine",
"is_master": true,
"supported_worker_apps": ["algo"],
"name": "master"
}
]
}Case 2: Machine A for Master node and Algo node, and Machine B only for Algo node
{
"nodes": [
{
"ip": "node1_computer_ip_address",
"user_name": "node1_computer_user_name",
"password": "node1_computer_password",
"is_master": true,
"supported_worker_apps": ["algo"],
"name": "master"
},
{
"ip": "node2_computer_ip_address",
"user_name": "node2_computer_user_name",
"password": "node2_computer_password",
"is_master": false,
"supported_worker_apps": ["algo"],
"name": "algo_1"
},
...
]
}The file is built on a per host basis, not per algo node basis. In case you are trying to add multiple algo nodes to a single host, there is not need to duplicate the entry in the cluster.json file.
If you want to use the machine for Edge node, you can add "edge" to "supported_worker_apps".
Run installation with
cluster.json
file.sr-launcher-cli run install -f cluster.json --force
This will install Docker and Nvidia-docker(if GPU is connected) on the machines, and load Docker images on each host.
Create cluster using the
cluster.json
file.sr-launcher-cli create cluster -f cluster.json <cluster_name> -o`
- <cluster_name> will be used to identify the cluster. It can be anything, but is recommended to use site_name for easy identification, or use names such as
c1
orc2
for easy use.
- <cluster_name> will be used to identify the cluster. It can be anything, but is recommended to use site_name for easy identification, or use names such as
Update
caution
If there is an update to SR Launcher, you must update to the latest version to ensure compatibility with SENSR.
If you simply want to deploy a previous version, the latest SR Launcher can be used.
- Stop SENSR
sr-launcher-cli stop sensr
- Remove the current SR Launcher from the host
sudo apt purge sr-launcher-cli # if you installed CLI version
- Go through the Installation process described here.
Uninstallation
When updating SENSR, new docker images are loaded onto the machine, over time, unused docker images can accumulate and consume disk space on the host. The SR launcher allows removing specific images of SENSR. Users can use the following commands to remove versions using the SR Launcher.
- List the versions installed in the host:
docker images
- Remove the images using one of the commands:
sr-launcher-cli uninstall version -v 3.3.0
#or (for multiple specific version)
sr-launcher-cli uninstall version -v "3.3.0, 3.3.1"
To remove all versions of SENSR loaded onto the host at once, use the following command:
sr-launcher-cli uninstall version --all
NOTE: The SR Launcher downloads and retains new Docker images without discarding the previous ones to facilitate potential downgrades. If you're running low on storage space, you can remove unused images from /opt/seoulrobotics/sr-launcher/resources/docker
.
NOTE 2: Images can also be dismounted separatey using the command docker rmi <IMAGE_ID>