- decently powered desktop GPU
- a core per stream is recommended
- optionally a hardware encoding capable GPU
- even smaller NVIDIA Quadro cards allow multiple encode/decode streams
- note consumer cards are limited to 2 streams only and hence useless for larger setups
- ideally two network interfaces
- it's best to keep the eyes on their own isolated subnet
- default Ubuntu 22.04 LTS
- Install AnyDesk (optional, only for our setup)
apt install build-essential vim git htop byobu unzip wget cmake yasm- copy
id_beholderpissh keys
It can be tricky to match compatible versions of the nvidia-drivers, nvidia-compute-utils, nvidia-cuda-toolkit and the ffmpeg nv headers. Best use the nvidia repositories to get cuda, which comes with a matching driver etc., then we just need to make sure the ffmpeg nv headers are up to date to work with them.
See https://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html#ubuntu
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/cuda-keyring_1.0-1_all.debsudo dpkg -i cuda-keyring_1.0-1_all.debecho "deb [signed-by=/usr/share/keyrings/cuda-archive-keyring.gpg] https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/ /" | sudo tee /etc/apt/sources.list.d/cuda-ubuntu2204-x86_64.list
Pin file to prioritize CUDA repo, then install CUDA:
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/cuda-ubuntu2204.pinsudo mv cuda-ubuntu2204.pin /etc/apt/preferences.d/cuda-repository-pin-600sudo apt update && sudo apt install cuda- Reboot
- Add CUDA to PATH in
.bashrc, elsenvccwon't be foundPATH="/usr/local/cuda/bin:$PATH"
git clone https://github.com/FFmpeg/nv-codec-headers.gitcd nv-codec-headers && sudo make install && cd –
apt install build-essential yasm cmake libtool libc6 libc6-dev libnuma1 libnuma-devgit clone https://git.ffmpeg.org/ffmpeg.git ffmpeg/cd ffmpeg
Note: Perhaps static is better to not be affected if libs change/wander about with driver updates?
-
./configure --enable-nonfree --enable-cuda-nvcc --enable-libnpp --extra-cflags=-I/usr/local/cuda/include --extra-ldflags=-L/usr/local/cuda/lib64 -
Else we can compile with shared libs:
-
./configure --enable-nonfree --enable-cuda-nvcc --enable-libnpp --extra-cflags=-I/usr/local/cuda/include --extra-ldflags=-L/usr/local/cuda/lib64 --disable-static --enable-shared -
add ffmpeg/ffprobe to PATH, either copy executables to
~/.local/binor make local bin directory with links:mkdir ~/bin && cd binln -s ~/src/ffmpeg/ffmpeg ffmpeg_gpuln -s ~/src/ffmpeg/ffprobe ffprobe_gpu- Append to
~/.bashrc:
if [ -d "$HOME/bin" ] ; then PATH="$HOME/bin:$PATH" fi
- download Anaconda or miniconda Python from https://anaconda.com
chmod +x <installer-file-name>.sh./<installer-file-name>.sh- Accept licence and use default
$HOME/anaconda3path - init anaconda (in installer, or via
conda init) - restart shell, conda base should be active
(base) username@beholder-desktop:~$ - update conda
conda update -n base -c defaults conda
Clone the repo
cd ~/src/git clone https://github.com/wonkoderverstaendige/BeholderPicd BeholderPi
Resolving the requirements.yaml file will take several minutes!
conda env create -n beholder -f requirements.yamlconda activate beholder
Install the actual beholder package and make launcher scripts accessible
pip install -e .cp scripts/launchers/* ~/bin/
check if beholder launches with beholder
sudo apt install chrony- Disable systemd NTP service
sudo timedatectl set-ntp off
- copy the chrony conf file
mv /etc/chrony/chrony.conf /etc/chrony/chrony.conf.bakcp ~/src/BeholderPi/ansible/templates/beholder/chrony.conf.j2 /etc/chrony/chrony.conf
sudo systemctl enable --now chrony
- check
chronyc trackingon beholder- connected to a reference server?
- check
chronyc trackingon spectator+eyes- is beholder PC the reference server and are offsets low?
sudo apt-mark hold:nvidia-compute-utils-XXXnvidia-dmks-XXXnvidia-driver-XXXnvidia-kernel-common-XXXnvidia-kernel-source-XXXnvidia-utils-XXXnvidia-modprobecan be reversed withapt-mark unhold ...
- disable screen suspend
- disable sleep/hibernate/power keys to prevent accidental shutoffs mid experiment
sudo -e logind.config- uncomment and change
HandleSuspendKeyandHandleHibernateKeytoignore