Skip to content

Commit

Permalink
Remove manual CMake build from Dockerfiles.
Browse files Browse the repository at this point in the history
Any base image building upon Ubuntu 22.04 already comes with CMake 3.22;
we can just make use of the system package.

Signed-off-by: Michael Hofmann <quic_michof@quicinc.com>
  • Loading branch information
quic-michof authored Jul 3, 2024
1 parent 872e704 commit c4857b7
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 63 deletions.
10 changes: 1 addition & 9 deletions Jenkins/Dockerfile.tf-cpu
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ RUN dpkg --add-architecture i386
RUN apt-get update > /dev/null && \
apt-get install --no-install-recommends -y \
build-essential \
cmake \
emacs \
environment-modules \
less \
Expand Down Expand Up @@ -179,15 +180,6 @@ RUN python3 -m pip --no-cache-dir install \
wget && \
python3 -m ipykernel.kernelspec

# Install cmake
RUN mkdir -p /opt/cmake && \
wget -P /tmp https://github.com/Kitware/CMake/releases/download/v3.19.3/cmake-3.19.3-Linux-x86_64.sh && \
sh /tmp/cmake-3.19.3-Linux-x86_64.sh --prefix=/opt/cmake --skip-license && \
rm -f /tmp/cmake-3.19.3-Linux-x86_64.sh && \
ln -fs /opt/cmake/bin/cmake /usr/local/bin/cmake && \
ln -fs /opt/cmake/bin/ctest /usr/local/bin/ctest && \
ln -fs /opt/cmake/bin/cpack /usr/local/bin/cpack

ENV PATH=/usr/local/bin:$PATH

# Opencv
Expand Down
10 changes: 1 addition & 9 deletions Jenkins/Dockerfile.tf-gpu
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ RUN dpkg --add-architecture i386
RUN apt-get update > /dev/null && \
apt-get install --no-install-recommends -y \
build-essential \
cmake \
emacs \
environment-modules \
less \
Expand Down Expand Up @@ -191,15 +192,6 @@ RUN python3 -m pip --no-cache-dir install \
wget && \
python3 -m ipykernel.kernelspec

# Install cmake
RUN mkdir -p /opt/cmake && \
wget -P /tmp https://github.com/Kitware/CMake/releases/download/v3.19.3/cmake-3.19.3-Linux-x86_64.sh && \
sh /tmp/cmake-3.19.3-Linux-x86_64.sh --prefix=/opt/cmake --skip-license && \
rm -f /tmp/cmake-3.19.3-Linux-x86_64.sh && \
ln -fs /opt/cmake/bin/cmake /usr/local/bin/cmake && \
ln -fs /opt/cmake/bin/ctest /usr/local/bin/ctest && \
ln -fs /opt/cmake/bin/cpack /usr/local/bin/cpack

ENV PATH=/usr/local/bin:$PATH

# Opencv
Expand Down
10 changes: 1 addition & 9 deletions Jenkins/Dockerfile.tf-torch-cpu
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ RUN dpkg --add-architecture i386
RUN apt-get update > /dev/null && \
apt-get install --no-install-recommends -y \
build-essential \
cmake \
emacs \
environment-modules \
less \
Expand Down Expand Up @@ -188,15 +189,6 @@ RUN python3 -m pip --no-cache-dir install \
wget && \
python3 -m ipykernel.kernelspec

# Install cmake
RUN mkdir -p /opt/cmake && \
wget -P /tmp https://github.com/Kitware/CMake/releases/download/v3.19.3/cmake-3.19.3-Linux-x86_64.sh && \
sh /tmp/cmake-3.19.3-Linux-x86_64.sh --prefix=/opt/cmake --skip-license && \
rm -f /tmp/cmake-3.19.3-Linux-x86_64.sh && \
ln -fs /opt/cmake/bin/cmake /usr/local/bin/cmake && \
ln -fs /opt/cmake/bin/ctest /usr/local/bin/ctest && \
ln -fs /opt/cmake/bin/cpack /usr/local/bin/cpack

# Onnxruntime C/C++ package needed to create custom C++ onnx ops for quantsim
RUN mkdir /opt/onnxruntime && \
export ONNXRUNTIME_VER=$(python3 -c 'import onnxruntime; print(onnxruntime.__version__)') && \
Expand Down
10 changes: 1 addition & 9 deletions Jenkins/Dockerfile.torch-cpu
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ RUN dpkg --add-architecture i386
RUN apt-get update > /dev/null && \
apt-get install --no-install-recommends -y \
build-essential \
cmake \
emacs \
environment-modules \
less \
Expand Down Expand Up @@ -195,15 +196,6 @@ RUN python3 -m pip --no-cache-dir install \
wget && \
python3 -m ipykernel.kernelspec

# Install cmake
RUN mkdir -p /opt/cmake && \
wget -P /tmp https://github.com/Kitware/CMake/releases/download/v3.19.3/cmake-3.19.3-Linux-x86_64.sh && \
sh /tmp/cmake-3.19.3-Linux-x86_64.sh --prefix=/opt/cmake --skip-license && \
rm -f /tmp/cmake-3.19.3-Linux-x86_64.sh && \
ln -fs /opt/cmake/bin/cmake /usr/local/bin/cmake && \
ln -fs /opt/cmake/bin/ctest /usr/local/bin/ctest && \
ln -fs /opt/cmake/bin/cpack /usr/local/bin/cpack

# Onnxruntime C/C++ package needed to create custom C++ onnx ops for quantsim
RUN mkdir /opt/onnxruntime && \
export ONNXRUNTIME_VER=$(python3 -c 'import onnxruntime; print(onnxruntime.__version__)') && \
Expand Down
10 changes: 1 addition & 9 deletions Jenkins/Dockerfile.torch-cpu-pt113
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ RUN dpkg --add-architecture i386
RUN apt-get update > /dev/null && \
apt-get install --no-install-recommends -y \
build-essential \
cmake \
emacs \
environment-modules \
less \
Expand Down Expand Up @@ -195,15 +196,6 @@ RUN python3 -m pip --no-cache-dir install \
wget && \
python3 -m ipykernel.kernelspec

# Install cmake
RUN mkdir -p /opt/cmake && \
wget -P /tmp https://github.com/Kitware/CMake/releases/download/v3.19.3/cmake-3.19.3-Linux-x86_64.sh && \
sh /tmp/cmake-3.19.3-Linux-x86_64.sh --prefix=/opt/cmake --skip-license && \
rm -f /tmp/cmake-3.19.3-Linux-x86_64.sh && \
ln -fs /opt/cmake/bin/cmake /usr/local/bin/cmake && \
ln -fs /opt/cmake/bin/ctest /usr/local/bin/ctest && \
ln -fs /opt/cmake/bin/cpack /usr/local/bin/cpack

# Onnxruntime C/C++ package needed to create custom C++ onnx ops for quantsim
RUN mkdir /opt/onnxruntime && \
export ONNXRUNTIME_VER=$(python3 -c 'import onnxruntime; print(onnxruntime.__version__)') && \
Expand Down
10 changes: 1 addition & 9 deletions Jenkins/Dockerfile.torch-gpu
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ RUN dpkg --add-architecture i386
RUN apt-get update > /dev/null && \
apt-get install --no-install-recommends -y \
build-essential \
cmake \
emacs \
environment-modules \
less \
Expand Down Expand Up @@ -207,15 +208,6 @@ RUN python3 -m pip --no-cache-dir install \
wget && \
python3 -m ipykernel.kernelspec

# Install cmake
RUN mkdir -p /opt/cmake && \
wget -P /tmp https://github.com/Kitware/CMake/releases/download/v3.19.3/cmake-3.19.3-Linux-x86_64.sh && \
sh /tmp/cmake-3.19.3-Linux-x86_64.sh --prefix=/opt/cmake --skip-license && \
rm -f /tmp/cmake-3.19.3-Linux-x86_64.sh && \
ln -fs /opt/cmake/bin/cmake /usr/local/bin/cmake && \
ln -fs /opt/cmake/bin/ctest /usr/local/bin/ctest && \
ln -fs /opt/cmake/bin/cpack /usr/local/bin/cpack

# Onnxruntime C/C++ package needed to create custom C++ onnx ops for quantsim
RUN mkdir /opt/onnxruntime && \
export ONNXRUNTIME_VER=$(python3 -c 'import onnxruntime; print(onnxruntime.__version__)') && \
Expand Down
10 changes: 1 addition & 9 deletions Jenkins/Dockerfile.torch-gpu-pt113
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ RUN dpkg --add-architecture i386
RUN apt-get update > /dev/null && \
apt-get install --no-install-recommends -y \
build-essential \
cmake \
emacs \
environment-modules \
less \
Expand Down Expand Up @@ -207,15 +208,6 @@ RUN python3 -m pip --no-cache-dir install \
wget && \
python3 -m ipykernel.kernelspec

# Install cmake
RUN mkdir -p /opt/cmake && \
wget -P /tmp https://github.com/Kitware/CMake/releases/download/v3.19.3/cmake-3.19.3-Linux-x86_64.sh && \
sh /tmp/cmake-3.19.3-Linux-x86_64.sh --prefix=/opt/cmake --skip-license && \
rm -f /tmp/cmake-3.19.3-Linux-x86_64.sh && \
ln -fs /opt/cmake/bin/cmake /usr/local/bin/cmake && \
ln -fs /opt/cmake/bin/ctest /usr/local/bin/ctest && \
ln -fs /opt/cmake/bin/cpack /usr/local/bin/cpack

# Onnxruntime C/C++ package needed to create custom C++ onnx ops for quantsim
RUN mkdir /opt/onnxruntime && \
export ONNXRUNTIME_VER=$(python3 -c 'import onnxruntime; print(onnxruntime.__version__)') && \
Expand Down

0 comments on commit c4857b7

Please sign in to comment.