-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path07-install-realsense
More file actions
executable file
·34 lines (26 loc) · 1.14 KB
/
07-install-realsense
File metadata and controls
executable file
·34 lines (26 loc) · 1.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/usr/bin/env bash
# https://github.com/IntelRealSense/librealsense/blob/master/doc/distribution_linux.md
install_realsense () (
set -euxo pipefail
# Assumes the base docker image already contains realsense
if [[ -f /.dockerenv ]]; then
return
fi
command -v sudo > /dev/null 2>&1 || { apt update && apt install --no-install-recommends -y sudo; }
# Install required packages in order to download and install the new repo.
sudo apt-get update
sudo apt-get install -y curl gpg apt-transport-https
# Download and install the key
local key_url="https://librealsense.intel.com/Debian/librealsense.pgp"
local key_file="/etc/apt/keyrings/librealsense.pgp"
curl -sL "${key_url}" | sudo tee "${key_file}" > /dev/null
# Add the repository
source /etc/os-release
echo "deb [signed-by=${key_file}] https://librealsense.intel.com/Debian/apt-repo ${UBUNTU_CODENAME} main" \
| sudo tee /etc/apt/sources.list.d/librealsense.list
sudo apt-get update
# Install the libraries
sudo apt-get install -y librealsense2-{dkms,utils}
sudo apt-get install -y librealsense2-{dev,dbg}
)
install_realsense