This repository contains scripts to automate setup steps for Ubuntu deployed Sighthound Analytics instances. It assumes execution on a WSL or Linux-like command line interface with support for bash scripts. This includes WSL Ubuntu on recent Windows releases.
This section describes deployment on Google Cloud Platform (GCP). These instructions allow you to create your own instance of the Sighthound Analytics deployment and potentially customize.
-
Create a Project on Google Cloud Platform to hold the new instance. You may also use an existing project, however you'll need to ensure your account has Compute Instance Admin permissions for the project.
-
Setup gcloud CLI for your account and host system.
-
Customize the
project_id
andcompute_instance_name
variables in theenvironment.sh
script:
project_id
should match the project ID (not name) you created in step 1.compute_instance_name
should be the name of the instance you'd like to create. This can be anything you choose, subject to GCP naming requirements.use_gpu
can be set totrue
to use a GPU deployment. Refer to Google Cloud GPU Pricing Detail for details about cost.
-
Obtain a key package from Sighthound which enables your deployment, and copy this key package into the directory where you've checked out this repository.
-
Run this script to create the instance in your specified project:
./create-ubuntu-instance-gcp.sh
This script will create the instance in the specified project and copy in content. It will
provide a gcloud compute ssh
command you can use to ssh into the instance for further configuration.
- Use the SSH command provided at the end of the previous script to SSH into the GCP instance. Then run:
./run-ubuntu-install-base-nvidia-docker.sh
To setup a base install with nvidia-docker and components required for Sighthound analytics.
- While ssh'd into the GCP instance, use the script
./run-sighthoundanalytics-install.sh
to complete the installation of sighthound analytics.
You can forward ports from your GCP instance to localhost, then access the Analytics Webapp at http://localhost:8081. Use a command like one below, where
the environment.sh
contains variables setup in step 1
source environment.sh
gcloud --project ${project_id} compute ssh --ssh-flag="-L 4000:localhost:4000 -L 8081:localhost:81 -L 15674:localhost:15674 -L 8085:localhost:8085" ${compute_instance_name}
You may also deploy your own instance using a custom hardware platform.
- Ubuntu 20.04 installation.
- Your machine should contain:
- A recent (<5 years old) Intel or AMD CPU
- At least 8 GB RAM (roughly 4GB per video stream)
- Optionally (for best performance), An Nvidia GPU from the 1000, 2000, or 3000 series with:
- CUDA >= 11.3
- TensorRT 8.0 and CUDNN 8.2 available via NVIDIA runtime
- A recent (<5 years old) Intel or AMD CPU
Follow the instructions here: Install Docker Engine on Ubuntu
Additionally, install docker compose:
sudo apt install qemu-user-static docker-compose
sudo apt-get update && sudo apt-get -y install python3 python3-pip
These instructions are only necessary when using an NVIDIA GPU.
- Follow instructions here: CUDA Toolkit 11.6 Update 1 Downloads
- Next, install the cuda container toolkit here: Welcome — NVIDIA Cloud Native Technologies documentation
- Configure the default runtime by editing
/etc/docker/daemon.json
and adding "default-runtime": "nvidia", e.g.
{
"default-runtime": "nvidia",
"runtimes": {
"nvidia": {
"path": "nvidia-container-runtime",
"runtimeArgs": []
}
}
}
- Reboot your machine after installing all of these packages.
You can test that the docker runtime is functioning correctly with docker run --rm nvidia/cuda:11.0-base nvidia-smi
- Add your key package to the directory containing the run-sighthoundanalytics-install.sh script.
- Run
./run-sighthoundanalytics-install.sh
Repeat the installation steps above.