Aggiornamento:
Il container e' disponibile gia' compilato su Docker.com al mio account
https://hub.docker.com/repository/docker/c1p81/realsense_2004/general
============================================
Ho deciso di tirare fuori dal cassetto la D415 Realsense e come al solito montare l'SDK diventa sempre piu' difficile a causa delle politiche di Intel di dismissione dei propri dispositivi
Stavolta volevo provare la strada dell'ambiente docker ma ne' il container ufficiale ne' alcuni trovati su docker hub risultavano completamente funzionanti e me lo sono scritto da solo
(da modificare l'image_id)
Bash
docker run -it --rm --privileged -v /dev:/dev -v "$HOME:/home/luca/" --device-cgroup-rule "c 81:* rmw" --device-cgroup-rule "c 189:* rmw" b105279d1264 /bin/bash
Realsense Viewer
xhost +
docker run -d --net=host --env="DISPLAY" --volume="$HOME/.Xauthority:/root/.Xauthority:rw" -v /dev:/dev --device-cgroup-rule "c 81:* rmw" --device-cgroup-rule "c 189:* rmw" 2bd94ff6bc38 realsense-viewer
Save to disk
docker run -it --rm --privileged -v /dev:/dev -v "$HOME:/home/luca/" --device-cgroup-rule "c 81:* rmw" --device-cgroup-rule "c 189:* rmw" 34ea465a203e sh -c "cd /home/luca && rs-save-to-disk"
per creare il docker si usa il comando
docker build -t 20_04_real .
con il seguente Dockerfile
FROM public.ecr.aws/lts/ubuntu:20.04_stable
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update \
&& apt-get install -qq -y --no-install-recommends \
build-essential \
cmake \
lsb-release \
git \
curl \
libssl-dev \
libusb-1.0-0-dev \
pkg-config \
libudev-dev \
libgtk-3-dev \
libglfw3-dev \
libgl1-mesa-dev \
libglu1-mesa-dev \
curl \
python3 \
python3-dev \
python3-pip \
libopencv-dev \
python3-opencv \
python3-numpy \
ca-certificates \
&& rm -rf /var/lib/apt/lists/*
RUN mkdir -p /etc/apt/keyrings
RUN curl -sSf https://librealsense.intel.com/Debian/librealsense.pgp | tee /etc/apt/keyrings/librealsense.pgp > /dev/null
RUN echo "deb [signed-by=/etc/apt/keyrings/librealsense.pgp] https://librealsense.intel.com/Debian/apt-repo `lsb_release -cs` main" | tee /etc/apt/sources.list.d/librealsense.list
RUN apt-get update
RUN apt-get -y install librealsense2-dkms librealsense2-utils librealsense2-dev librealsense2-dbg librealsense2-udev-rules mc nano locales
RUN apt-get clean
RUN pip install pyrealsense2
RUN git clone https://github.com/IntelRealSense/librealsense
RUN cd librealsense
RUN mkdir /librealsense/build
WORKDIR /librealsense/build
RUN cmake ../ -DBUILD_EXAMPLES=true
RUN make