Dockerfile for sdk 3.8 on ubuntu 22

Hi Stereolabs,

Would it be possible to provide a Dockerfile for SDK 3.8 on Ubuntu 22? I don’t want to mangle my machine with some random cuda install…

Thanks,
Arta

Hi @arta
Welcome to the Stereolabs Community.

You can try to use this base Dockerfile:

ARG IMAGE_NAME="nvcr.io/nvidia/cuda:11.7.1-devel-ubuntu22.04"

FROM $IMAGE_NAME

# Disable apt-get warnings
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y --no-install-recommends apt-utils dialog

ENV TZ=Europe/Paris

RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone && \ 
    apt-get update && apt-get upgrade --yes && \
    apt-get install --yes lsb-release wget less udev sudo build-essential cmake python3 python3-dev python3-pip python3-wheel git jq libopencv-dev libpq-dev zstd usbutils && \    
    rm -rf /var/lib/apt/lists/* && \
    apt-get autoremove && apt-get clean

RUN ln -s /usr/bin/python3 /usr/bin/python && \
    python -m pip install wheel setuptools scikit-build cython && \
    python -m pip install opencv-python-headless psycopg2
      
# Install the ZED SDK

ARG UBUNTU_RELEASE_YEAR=22
ARG CUDA_MAJOR=11
ARG CUDA_MINOR=7
ARG ZED_SDK_MAJOR=3
ARG ZED_SDK_MINOR=8

RUN echo "CUDA Version $CUDA_VERSION" > /usr/local/cuda/version.txt

# Setup the ZED SDK
RUN apt-get update -y || true && \
  apt-get install --no-install-recommends dialog bash-completion lsb-release wget less udev sudo  build-essential cmake zstd python3 python3-pip libpng-dev libgomp1 -y && \
  python3 -m pip install --upgrade pip; python3 -m pip install numpy opencv-python-headless && \
  wget -q -O ZED_SDK_Linux_Ubuntu.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.run && \
  ./ZED_SDK_Linux_Ubuntu.run -- silent skip_tools skip_cuda && \
  ln -sf /lib/x86_64-linux-gnu/libusb-1.0.so.0 /usr/lib/x86_64-linux-gnu/libusb-1.0.so && \
  rm ZED_SDK_Linux_Ubuntu.run && \
  rm -rf /var/lib/apt/lists/*

Thanks for the fast reply. It built the image without problem.

1 Like