Skip to content

Commit

Permalink
Add l4t base dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
seanavery committed Dec 6, 2023
1 parent d65b161 commit 1392332
Showing 1 changed file with 111 additions and 0 deletions.
111 changes: 111 additions & 0 deletions etc/Dockerfile.base.l4t
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
ARG L4T_TAG
FROM nvcr.io/nvidia/l4t-base:${L4T_TAG}

RUN apt-get -y update

# install viam-cpp-sdk
# reference: https://github.com/viamrobotics/viam-cpp-sdk
RUN apt-get -y --no-install-recommends install \
build-essential \
ca-certificates \
curl \
doxygen \
g++ \
gdb \
git \
gnupg \
gpg \
less \
libboost-all-dev \
libc-ares-dev \
libre2-dev \
libssl-dev \
ninja-build \
pkg-config \
software-properties-common \
sudo \
wget \
zlib1g-dev

RUN bash -c 'wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key|apt-key add -'
RUN apt-add-repository -y 'deb http://apt.llvm.org/focal/ llvm-toolchain-focal-15 main'

RUN wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | gpg --dearmor - > /usr/share/keyrings/kitware-archive-keyring.gpg
RUN echo 'deb [signed-by=/usr/share/keyrings/kitware-archive-keyring.gpg] https://apt.kitware.com/ubuntu/ focal main' > /etc/apt/sources.list.d/kitware.list

RUN apt-get update

RUN apt-get -y --no-install-recommends install -t llvm-toolchain-focal-15 \
clang-15 \
clang-tidy-15

RUN apt-get -y install cmake

RUN mkdir -p ${HOME}/opt/src

RUN cd ${HOME}/opt/src && \
git clone --recurse-submodules -b v1.52.0 --depth 1 --shallow-submodules https://github.com/grpc/grpc && \
cd grpc && \
mkdir -p build && \
cd build && \
cmake .. -G Ninja \
-DgRPC_ZLIB_PROVIDER=package \
-DgRPC_CARES_PROVIDER=package \
-DgRPC_RE2_PROVIDER=package \
-DgRPC_SSL_PROVIDER=package \
-DgRPC_INSTALL=ON \
-DgRPC_BUILD_TESTS=OFF \
-DBUILD_SHARED_LIBS=ON \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_INSTALL_PREFIX=/usr/local \
-DCMAKE_INSTALL_RPATH=/usr/local/lib && \
ninja install && \
cd .. && \
rm -rf build

RUN cd ${HOME}/opt/src && \
git clone https://github.com/viamrobotics/viam-cpp-sdk && \
cd viam-cpp-sdk && \
mkdir build && \
cd build && \
cmake -DVIAMCPPSDK_USE_DYNAMIC_PROTOS=ON -DVIAMCPPSDK_OFFLINE_PROTO_GENERATION=ON .. -G Ninja && \
ninja install -j 1

# install viam-csi
RUN cp -r ${HOME}/opt/src/viam-cpp-sdk/build/install/* /usr/local/

# install appimage-builder
RUN apt install -y \
binutils \
coreutils \
desktop-file-utils \
fakeroot \
fuse \
libgdk-pixbuf2.0-dev \
patchelf \
python3-pip python3-setuptools \
squashfs-tools \
strace \
util-linux zsync

RUN pip3 install -U pip setuptools urllib3==1.26.12 requests==2.26.0

# install appimage-builder
RUN cd ${HOME}/opt/src && \
git clone https://github.com/AppImageCrafters/appimage-builder.git && \
cd appimage-builder && \
pip3 install ./

# install docker
RUN apt-get -y install \
apt-transport-https \
ca-certificates \
curl \
gnupg \
lsb-release && \
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg && \
echo \
"deb [arch=arm64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null && \
apt-get -y update && \
apt-get -y install docker-ce docker-ce-cli containerd.io

0 comments on commit 1392332

Please sign in to comment.