Skip to content

Commit

Permalink
Update arm version of the docker image
Browse files Browse the repository at this point in the history
  • Loading branch information
amessing-bdai committed Oct 16, 2024
1 parent 1b09cb2 commit 0a17fec
Show file tree
Hide file tree
Showing 3 changed files with 68 additions and 24 deletions.
52 changes: 28 additions & 24 deletions .devcontainer/Dockerfile.arm64
Original file line number Diff line number Diff line change
@@ -1,29 +1,33 @@
FROM arm64v8/ubuntu:22.04
SHELL ["/bin/bash", "-c"]

RUN apt-get update --fix-missing &&\
apt-get install -y --no-install-recommends build-essential ca-certificates cmake git g++ pkg-config python3 curl ninja-build tar zip unzip zlib1g-dev libssl-dev wget &&\
apt-get autoclean &&\
apt-get autoremove &&\
apt-get clean &&\
rm -rf /var/lib/apt/lists/*
RUN apt-get update --fix-missing \
&& apt-get install -y --no-install-recommends \
build-essential \
ca-certificates \
cmake \
git \
libcli11-dev \
libeigen3-dev \
libgrpc++-dev \
libprotobuf-dev \
g++ \
pkg-config \
protobuf-compiler \
protobuf-compiler-grpc \
python3 \
curl \
ninja-build \
tar \
zip \
unzip \
zlib1g-dev \
libssl-dev \
wget \
&& apt-get autoclean \
&& apt-get autoremove \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

RUN update-ca-certificates

RUN wget https://github.com/Kitware/CMake/releases/download/v3.28.3/cmake-3.28.3.tar.gz &&\
tar -xzf cmake-3.28.3.tar.gz &&\
cd cmake-3.28.3 &&\
./configure &&\
make install &&\
cd .. &&\
rm cmake-3.28.3.tar.gz &&\
rm -r cmake-3.28.3

RUN git clone https://github.com/microsoft/vcpkg &&\
cd vcpkg &&\
git checkout 3b213864579b6fa686e38715508f7cd41a50900f &&\
export VCPKG_FORCE_SYSTEM_BINARIES=arm &&\
./bootstrap-vcpkg.sh -disableMetrics &&\
./vcpkg install grpc:arm64-linux &&\
./vcpkg install eigen3:arm64-linux &&\
./vcpkg install cli11:arm64-linux
COPY entrypoint.sh .
29 changes: 29 additions & 0 deletions .devcontainer/Dockerfile.arm64_vcpkg
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
FROM arm64v8/ubuntu:22.04
SHELL ["/bin/bash", "-c"]

RUN apt-get update --fix-missing &&\
apt-get install -y --no-install-recommends build-essential ca-certificates cmake git g++ pkg-config python3 curl ninja-build tar zip unzip zlib1g-dev libssl-dev wget &&\
apt-get autoclean &&\
apt-get autoremove &&\
apt-get clean &&\
rm -rf /var/lib/apt/lists/*

RUN update-ca-certificates

RUN wget https://github.com/Kitware/CMake/releases/download/v3.28.3/cmake-3.28.3.tar.gz &&\
tar -xzf cmake-3.28.3.tar.gz &&\
cd cmake-3.28.3 &&\
./configure &&\
make install &&\
cd .. &&\
rm cmake-3.28.3.tar.gz &&\
rm -r cmake-3.28.3

RUN git clone https://github.com/microsoft/vcpkg &&\
cd vcpkg &&\
git checkout 3b213864579b6fa686e38715508f7cd41a50900f &&\
export VCPKG_FORCE_SYSTEM_BINARIES=arm &&\
./bootstrap-vcpkg.sh -disableMetrics &&\
./vcpkg install grpc:arm64-linux &&\
./vcpkg install eigen3:arm64-linux &&\
./vcpkg install cli11:arm64-linux
11 changes: 11 additions & 0 deletions .devcontainer/build.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,13 @@
#!/usr/bin/env bash
ARCH=$(dpkg --print-architecture)

if [ "$ARCH" == "amd64" ]; then
docker build -t spot_builder -f Dockerfile.amd64 .
elif [ "$ARCH" == "arm64" ]; then
docker build -t spot_builder -f Dockerfile.arm64 .
else
echo "Unknown architecture: $ARCH" > /dev/stderr
exit 1
fi

docker run -v ~/spot-cpp-sdk:/spot-cpp-sdk spot_builder /entrypoint.sh

0 comments on commit 0a17fec

Please sign in to comment.