Open1
ZED2用コンテナのビルド
Dockerfile
内で ZED SDK をインストールするとき、keyboard の選択肢でAbortするので強制回避する魔術。
# ZED2 environment setting
ARG UBUNTU_RELEASE_YEAR=22
ARG CUDA_MAJOR=11
ARG CUDA_MINOR=7
ARG ZED_SDK_MAJOR=3
ARG ZED_SDK_MINOR=8
RUN apt-get install --no-install-recommends lsb-release wget less udev sudo zstd expect -y && \
wget -q -O ZED_SDK_Linux_Ubuntu${UBUNTU_RELEASE_YEAR}.run https://download.stereolabs.com/zedsdk/${ZED_SDK_MAJOR}.${ZED_SDK_MINOR}/cu${CUDA_MAJOR}${CUDA_MINOR%.*}/ubuntu${UBUNTU_RELEASE_YEAR} && \
chmod +x ZED_SDK_Linux_Ubuntu${UBUNTU_RELEASE_YEAR}.run && \
printf "\
set timeout -1\n\
spawn sudo ./ZED_SDK_Linux_Ubuntu${UBUNTU_RELEASE_YEAR}.run -- silent runtime_only\n\
expect {\n\
\"\\\\\\\\\[More\\\\\\\\\]\" { send \"\\\n\"; exp_continue; }\n\
\"Country of origin for the keyboard: \" { send \"55\\\n\"; }\n\
}\n\
expect {\n\
\"\\\\\\\\\[More\\\\\\\\\]\" { send \"\\\n\"; exp_continue; }\n\
\"Keyboard layout: \" { send \"1\\\n\" }\n\
}\n\
expect eof\n\
" | expect && \
rm ZED_SDK_Linux_Ubuntu${UBUNTU_RELEASE_YEAR}.run && \
rm -rf /var/lib/apt/lists/*