-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathDockerfile
More file actions
104 lines (92 loc) · 3.09 KB
/
Copy pathDockerfile
File metadata and controls
104 lines (92 loc) · 3.09 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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
FROM ubuntu:jammy
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update
RUN apt-get -y dist-upgrade
RUN apt-get -y --no-install-recommends install \
build-essential \
ca-certificates \
curl \
doxygen \
g++ \
gdb \
git \
gnupg \
gpg \
jq \
less \
libabsl-dev \
libboost-all-dev \
libgrpc++-dev \
libprotobuf-dev \
libssl-dev \
libusb-1.0-0-dev \
libudev-dev \
libgtk-3-dev \
lsb-release \
ninja-build \
pkg-config \
protobuf-compiler-grpc \
software-properties-common \
sudo \
libjsoncpp-dev \
wget
# Install CMake 3.x from Kitware's official repository
RUN wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | \
gpg --dearmor - | \
tee /usr/share/keyrings/kitware-archive-keyring.gpg >/dev/null && \
echo "deb [signed-by=/usr/share/keyrings/kitware-archive-keyring.gpg] https://apt.kitware.com/ubuntu/ $(lsb_release -cs) main" | \
tee /etc/apt/sources.list.d/kitware.list >/dev/null && \
apt-get update && \
apt-get install -y --no-install-recommends cmake=3.30.* cmake-data=3.30.*
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/jammy/ llvm-toolchain-jammy-19 main'
RUN apt-add-repository -y 'deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-19 main'
RUN apt-get update
RUN apt-get -y --no-install-recommends install -t llvm-toolchain-jammy-19 \
clang-19 \
clang-format-19 \
clang-tidy-19 \
clangd-19 \
clang-tools-19 \
lldb-19
RUN mkdir -p /root/opt/src
# Install Eigen
RUN apt install -y libeigen3-dev
# Install xtl 0.8.1 (required by xtensor, header-only)
RUN cd /root/opt/src && \
git clone https://github.com/xtensor-stack/xtl.git && \
cd xtl && \
git checkout 0.8.1 && \
cmake -S . -B build \
-DCMAKE_BUILD_TYPE=Release \
-G Ninja && \
cmake --build build -- -j4 && \
cmake --install build --prefix /usr/local && \
rm -rf /root/opt/src/xtl
# Install xtensor 0.27.1 (compatible with clang-19, header-only)
RUN cd /root/opt/src && \
git clone https://github.com/xtensor-stack/xtensor.git && \
cd xtensor && \
git checkout 0.27.1 && \
cmake -S . -B build \
-DCMAKE_BUILD_TYPE=Release \
-G Ninja && \
cmake --build build -- -j4 && \
cmake --install build --prefix /usr/local && \
rm -rf /root/opt/src/xtensor
# Install Viam C++ SDK from source. If you change the
# version here, change it in the top level CMakeLists.txt as well.
RUN cd /root/opt/src && \
git clone https://github.com/viamrobotics/viam-cpp-sdk && \
cd viam-cpp-sdk && \
git checkout releases/v0.39.0 && \
cmake -S . -B build \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DVIAMCPPSDK_USE_DYNAMIC_PROTOS=ON \
-DVIAMCPPSDK_OFFLINE_PROTO_GENERATION=ON \
-DVIAMCPPSDK_BUILD_EXAMPLES=OFF \
-DVIAMCPPSDK_BUILD_TESTS=OFF \
-G Ninja && \
cmake --build build --target all -- -j4 && \
cmake --install build --prefix /usr/local && \
rm -rf /root/opt/src/viam-cpp-sdk