diff --git a/.gitignore b/.gitignore index af8a40c69db..c69d1bb5cb0 100644 --- a/.gitignore +++ b/.gitignore @@ -31,3 +31,4 @@ unit_test_results # Other generated files *.swp packaging/setup_cfg.py +package_info.py diff --git a/Jenkins/Dockerfile.onnx-cpu b/Jenkins/Dockerfile.onnx-cpu deleted file mode 120000 index fff98ed9d7d..00000000000 --- a/Jenkins/Dockerfile.onnx-cpu +++ /dev/null @@ -1 +0,0 @@ -Dockerfile.torch-cpu-pt113 \ No newline at end of file diff --git a/Jenkins/Dockerfile.onnx-cpu b/Jenkins/Dockerfile.onnx-cpu new file mode 100644 index 00000000000..64eea1f2a44 --- /dev/null +++ b/Jenkins/Dockerfile.onnx-cpu @@ -0,0 +1,268 @@ +# ============================================================================= +# @@-COPYRIGHT-START-@@ +# +# Copyright (c) 2021-2024, Qualcomm Innovation Center, Inc. All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# +# 1. Redistributions of source code must retain the above copyright notice, +# this list of conditions and the following disclaimer. +# +# 2. Redistributions in binary form must reproduce the above copyright notice, +# this list of conditions and the following disclaimer in the documentation +# and/or other materials provided with the distribution. +# +# 3. Neither the name of the copyright holder nor the names of its contributors +# may be used to endorse or promote products derived from this software +# without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# +# SPDX-License-Identifier: BSD-3-Clause +# +# @@-COPYRIGHT-END-@@ +# ============================================================================= + +# Docker image file to build and test AIMET for ONNX in a CPU environment + +ARG REGISTRY +FROM ${REGISTRY}ubuntu:jammy + +ARG DEBIAN_FRONTEND=noninteractive +ARG APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=DontWarn + +RUN apt-get update > /dev/null && \ + apt-get install --no-install-recommends -y \ + # Bare minimum Packages + ca-certificates \ + git \ + ssh \ + sudo \ + wget \ + xterm \ + xauth > /dev/null && \ + rm -rf /var/lib/apt/lists/* + +# Install certificates +RUN sudo update-ca-certificates + +# Modified version of bash.bashrc that adjusts the prompt +### COPY bash.bashrc /etc/ +### RUN chmod 644 /etc/bash.bashrc + +### COPY profile.global /usr/local/etc/ +### RUN chmod 555 /usr/local/etc/profile.global + +# Add sudo support +RUN echo "%users ALL = (ALL) NOPASSWD: ALL" >> /etc/sudoers + +RUN apt-get update -y > /dev/null && \ + apt-get install --no-install-recommends -y \ + # Python + python3.10 \ + python3.10-dev \ + python3.10-venv \ + python3-pip \ + python3-setuptools \ + build-essential \ + # lmdb dependency + libffi-dev && \ + rm -rf /var/lib/apt/lists/* + +# Register the version in alternatives +RUN update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.10 1 +# Set python 3.10 as the default python +RUN update-alternatives --set python3 /usr/bin/python3.10 + +# Upgrade Python3 pip and install some more packages +RUN python3 -m pip --no-cache-dir install --upgrade \ + pip \ + setuptools==49.4.0 \ + wheel + +# Ubuntu packages for pytorch aimet +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 \ + libavcodec-dev \ + libavformat-dev \ + libeigen3-dev \ + libgtest-dev \ + libgtk2.0-dev \ + libncurses5 \ + libsox-dev \ + libsox-fmt-all \ + libstdc++6:i386 \ + libswscale-dev \ + libtinfo5 \ + libunwind-14 \ + libc++-dev \ + libxtst6 \ + lsb-release \ + meld \ + nano \ + pandoc \ + pkg-config \ + python3-tk \ + sox \ + tree \ + unzip \ + vim && \ + rm -rf /var/lib/apt/lists/* + +# Python3 Packages +RUN python3 -m pip --no-cache-dir install \ + astroid==2.5.6 \ + attrs>=19.1.0 \ + behave==1.2.6 \ + blosc==1.10.1 \ + cffi \ + click \ + cma \ + cumm \ + cvxpy \ + cylp \ + cython \ + dataclasses \ + datasets \ + Deprecated \ + deepspeed \ + docutils==0.16 \ + graphviz \ + grpcio \ + grpcio-tools \ + h5py \ + ipykernel \ + ipython \ + Jinja2==3.0.3 \ + jupyter \ + keras==2.2.4 \ + lmdb==1.2.1 \ + matplotlib>=3 \ + mock \ + nbsphinx \ + networkx \ + 'numpy<1.24,>=1.20.5' \ + onnx==1.16.1 \ + onnxscript \ + onnxsim \ + onnxruntime==1.18.1 \ + onnxruntime-extensions \ + opencv-python \ + peft \ + Pillow==9.3.0 \ + pluggy==0.12.0 \ + progressbar2 \ + protobuf==3.20.2 \ + psutil \ + ptflops \ + pybind11 \ + pydot \ + pyDOE2 \ + pylint==2.8.3 \ + pymoo \ + pytest \ + pytest-cov \ + pytorch-ignite \ + PyYAML \ + scikit-learn==1.1.3 \ + scipy==1.8.1 \ + spconv \ + sphinx \ + sphinx-autodoc-typehints \ + sphinx-jinja \ + sphinx-rtd-theme \ + tensorboard==2.4.0 \ + tensorboardX==2.4 \ + timm==0.4.12 \ + torchtext \ + tqdm \ + transformers==4.27.4 \ + wget && \ + python3 -m ipykernel.kernelspec + +# 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__)') && \ + wget -qO- "https://github.com/microsoft/onnxruntime/releases/download/v${ONNXRUNTIME_VER}/onnxruntime-linux-x64-${ONNXRUNTIME_VER}.tgz" | tar xvz --strip-components 1 -C /opt/onnxruntime && \ + ln -s /opt/onnxruntime /usr/local/bin/onnxruntime_headers + +ENV PATH=/usr/local/bin:$PATH + +# Opencv +# Ref: https://docs.opencv.org/3.4.19/d7/d9f/tutorial_linux_install.html +RUN wget -q https://github.com/opencv/opencv/archive/refs/tags/3.4.19.tar.gz -O /tmp/3.4.19.tar.gz > /dev/null && \ + tar -C /tmp -xvf /tmp/3.4.19.tar.gz > /dev/null && \ + cd /tmp/opencv-3.4.19 && mkdir release && cd release && \ + cmake -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DBUILD_SHARED_LIBS=OFF -DCMAKE_BUILD_TYPE=release -DWITH_FFMPEG=OFF -DBUILD_TESTS=OFF -DWITH_CUDA=OFF -DBUILD_PERF_TESTS=OFF -DWITH_IPP=OFF -DENABLE_PRECOMPILED_HEADERS=OFF -DWITH_ITT=OFF .. > /dev/null && \ + make -j16 > /dev/null && \ + make -j16 install > /dev/null && \ + rm -rf /tmp/opencv-3.4.19* + +EXPOSE 25000 +RUN apt-get update && apt-get install -y openssh-server && rm -rf /var/lib/apt/lists/* +RUN mkdir /var/run/sshd + +RUN apt-get update && apt-get install -y liblapacke liblapacke-dev && rm -rf /var/lib/apt/lists/* + +RUN apt-get update && apt-get install -y libjpeg8-dev && \ + rm -rf /var/lib/apt/lists/* + +# Set up symlink to point to the correct python version +RUN ln -sf /usr/bin/python3.10 /usr/bin/python +RUN ln -s /usr/lib/x86_64-linux-gnu/libjpeg.so /usr/lib + +RUN sed -i 's/PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config && \ + sed -i 's/Port 22/Port 25000/' /etc/ssh/sshd_config + +# SSH login fix. Otherwise user is kicked off after login +RUN sed 's@session\s*required\s*pam_loginuid.so@session optional pam_loginuid.so@g' -i /etc/pam.d/sshd + +RUN python3 -m pip install git-pylint-commit-hook osqp twine + +# NOTE: We need to pin the holoviews version to this since the latest version has a circular dependency on bokeh 2.0.0 through the panel package +RUN python3 -m pip install holoviews==1.18.3 netron jsonschema pandas==1.5.3 + +# Note: bokeh requires Pillow while we need to use Pillow-SIMD for performance reasons. +RUN python3 -m pip install bokeh==3.2.2 hvplot==0.9.2 + +# Remove existing Pillow & Pillow-SIMD and replace with correct version of Pillow-SIMD. +RUN python3 -m pip uninstall -y Pillow Pillow-SIMD +RUN python3 -m pip --no-cache-dir install Pillow-SIMD==9.0.0.post1 + +# Force-install the LATEST version of Python3 Torch Packages, then pin back some dependencies +RUN unset PIP_CONFIG_FILE && \ + python3 -m pip install --upgrade --force-reinstall --isolated \ + torch -f https://download.pytorch.org/whl/cpu/torch \ + torchaudio -f https://download.pytorch.org/whl/cpu/torchaudio \ + torchvision -f https://download.pytorch.org/whl/cpu/torchvision \ + numpy==1.24.4 \ + fsspec[http]==2024.6.1 + +RUN apt-get update && apt-get install -y gnupg2 +# Downloaded from https://apt.llvm.org/ +RUN wget -O - http://llvm.org/apt/llvm-snapshot.gpg.key|sudo apt-key add - && echo "deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-14 main" >> /etc/apt/sources.list +RUN apt-get update --fix-missing -y && apt upgrade -y && apt-get install -y clang-11 clang-format clang-tidy-11 && \ + rm -rf /var/lib/apt/lists/* + +# Create a version-less symbolic link for clang-tidy +RUN ln -s /usr/bin/run-clang-tidy-11.py /usr/bin/run-clang-tidy.py + +# Provide write permission to the python package folder in order to install AIMET in editable mode +RUN chmod o+w /usr/local/lib/python3.10/dist-packages diff --git a/Jenkins/Dockerfile.onnx-gpu b/Jenkins/Dockerfile.onnx-gpu deleted file mode 120000 index f95e5ca69dd..00000000000 --- a/Jenkins/Dockerfile.onnx-gpu +++ /dev/null @@ -1 +0,0 @@ -Dockerfile.torch-gpu-pt113 \ No newline at end of file diff --git a/Jenkins/Dockerfile.onnx-gpu b/Jenkins/Dockerfile.onnx-gpu new file mode 100644 index 00000000000..b58c497bf9b --- /dev/null +++ b/Jenkins/Dockerfile.onnx-gpu @@ -0,0 +1,291 @@ +# ============================================================================= +# @@-COPYRIGHT-START-@@ +# +# Copyright (c) 2021-2024, Qualcomm Innovation Center, Inc. All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# +# 1. Redistributions of source code must retain the above copyright notice, +# this list of conditions and the following disclaimer. +# +# 2. Redistributions in binary form must reproduce the above copyright notice, +# this list of conditions and the following disclaimer in the documentation +# and/or other materials provided with the distribution. +# +# 3. Neither the name of the copyright holder nor the names of its contributors +# may be used to endorse or promote products derived from this software +# without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# +# SPDX-License-Identifier: BSD-3-Clause +# +# @@-COPYRIGHT-END-@@ +# ============================================================================= + +# Docker image file to build and test AIMET for ONNX in a GPU environment + +ARG REGISTRY +FROM ${REGISTRY}nvidia/cuda:11.8.0-cudnn8-devel-ubuntu22.04 + +ARG DEBIAN_FRONTEND=noninteractive +ARG APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=DontWarn + +# Please see here for more information on these steps: +# https://forums.developer.nvidia.com/t/gpg-error-http-developer-download-nvidia-com-compute-cuda-repos-ubuntu2004-x86-64/212904 +## The additional steps are to fix this error and eliminate/reduce some warnings: +## Failed to fetch https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/Packages.gz Hash Sum mismatch +RUN mv /etc/apt/sources.list.d/cuda-ubuntu2204-x86_64.list /etc/apt/sources.list.d/cuda.list.orig && \ + apt-get update > /dev/null && \ + apt-get install -y --no-install-recommends apt-utils && \ + apt-key adv --no-tty --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/3bf863cc.pub && \ + apt-get update > /dev/null && \ + rm -rf /var/lib/apt/lists/* + +RUN apt-get update > /dev/null && \ + apt-get install --no-install-recommends -y \ + # Bare minimum Packages + ca-certificates \ + git \ + ssh \ + sudo \ + wget \ + xterm \ + xauth > /dev/null && \ + rm -rf /var/lib/apt/lists/* + +# Install certificates +RUN sudo update-ca-certificates + +# Modified version of bash.bashrc that adjusts the prompt +### COPY bash.bashrc /etc/ +### RUN chmod 644 /etc/bash.bashrc + +### COPY profile.global /usr/local/etc/ +### RUN chmod 555 /usr/local/etc/profile.global + +# Add sudo support +RUN echo "%users ALL = (ALL) NOPASSWD: ALL" >> /etc/sudoers + +RUN apt-get update -y > /dev/null && \ + apt-get install --no-install-recommends -y \ + # Python + python3.10 \ + python3.10-dev \ + python3.10-venv \ + python3-pip \ + python3-setuptools \ + build-essential \ + # lmdb dependency + libffi-dev && \ + rm -rf /var/lib/apt/lists/* + +# Register the version in alternatives +RUN update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.10 1 +# Set python 3.10 as the default python +RUN update-alternatives --set python3 /usr/bin/python3.10 + +# Upgrade Python3 pip and install some more packages +RUN python3 -m pip --no-cache-dir install --upgrade \ + pip \ + setuptools==49.4.0 \ + wheel + +# Ubuntu packages for pytorch aimet +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 \ + libavcodec-dev \ + libavformat-dev \ + libeigen3-dev \ + libgtest-dev \ + libgtk2.0-dev \ + libncurses5 \ + libsox-dev \ + libsox-fmt-all \ + libstdc++6:i386 \ + libswscale-dev \ + libtinfo5 \ + libunwind-14 \ + libc++-dev \ + libxtst6 \ + lsb-release \ + meld \ + nano \ + pandoc \ + pkg-config \ + python3-tk \ + sox \ + tree \ + unzip \ + vim && \ + rm -rf /var/lib/apt/lists/* + +# Python3 Packages +RUN python3 -m pip --no-cache-dir install \ + astroid==2.5.6 \ + attrs>=19.1.0 \ + behave==1.2.6 \ + blosc==1.10.1 \ + cffi \ + click \ + cma \ + cumm-cu118 \ + cvxpy \ + cylp \ + cython \ + dataclasses \ + datasets \ + Deprecated \ + deepspeed \ + docutils==0.16 \ + graphviz \ + grpcio \ + grpcio-tools \ + h5py \ + ipykernel \ + ipython \ + Jinja2==3.0.3 \ + jupyter \ + keras==2.2.4 \ + lmdb==1.2.1 \ + matplotlib>=3 \ + mock \ + nbsphinx \ + networkx \ + 'numpy<1.24,>=1.20.5' \ + onnx==1.16.1 \ + onnxscript \ + onnxsim \ + onnxruntime==1.18.1 \ + onnxruntime-extensions \ + opencv-python \ + peft \ + Pillow==9.3.0 \ + pluggy==0.12.0 \ + progressbar2 \ + protobuf==3.20.2 \ + psutil \ + ptflops \ + pybind11 \ + pydot \ + pyDOE2 \ + pylint==2.8.3 \ + pymoo \ + pytest \ + pytest-cov \ + pytorch-ignite \ + PyYAML \ + scikit-learn==1.1.3 \ + scipy==1.8.1 \ + spconv-cu118 \ + sphinx \ + sphinx-autodoc-typehints \ + sphinx-jinja \ + sphinx-rtd-theme \ + tensorboard==2.4.0 \ + tensorboardX==2.4 \ + timm==0.4.12 \ + torchtext \ + tqdm \ + transformers==4.27.4 \ + wget && \ + python3 -m ipykernel.kernelspec + +# 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__)') && \ + wget -qO- "https://github.com/microsoft/onnxruntime/releases/download/v${ONNXRUNTIME_VER}/onnxruntime-linux-x64-gpu-${ONNXRUNTIME_VER}.tgz" | tar xvz --strip-components 1 -C /opt/onnxruntime && \ + ln -s /opt/onnxruntime /usr/local/bin/onnxruntime_headers + +ENV PATH=/usr/local/bin:$PATH + +# Opencv +# Ref: https://docs.opencv.org/3.4.19/d7/d9f/tutorial_linux_install.html +RUN wget -q https://github.com/opencv/opencv/archive/refs/tags/3.4.19.tar.gz -O /tmp/3.4.19.tar.gz > /dev/null && \ + tar -C /tmp -xvf /tmp/3.4.19.tar.gz > /dev/null && \ + cd /tmp/opencv-3.4.19 && mkdir release && cd release && \ + cmake -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DBUILD_SHARED_LIBS=OFF -DCMAKE_BUILD_TYPE=release -DWITH_FFMPEG=OFF -DBUILD_TESTS=OFF -DWITH_CUDA=OFF -DBUILD_PERF_TESTS=OFF -DWITH_IPP=OFF -DENABLE_PRECOMPILED_HEADERS=OFF -DWITH_ITT=OFF .. > /dev/null && \ + make -j16 > /dev/null && \ + make -j16 install > /dev/null && \ + rm -rf /tmp/opencv-3.4.19* + +EXPOSE 25000 +RUN apt-get update && apt-get install -y openssh-server && rm -rf /var/lib/apt/lists/* +RUN mkdir /var/run/sshd + +RUN apt-get update && apt-get install -y liblapacke liblapacke-dev && rm -rf /var/lib/apt/lists/* + +RUN apt-get update && apt-get install -y libjpeg8-dev && \ + rm -rf /var/lib/apt/lists/* + +# Set up symlink to point to the correct python version +RUN ln -sf /usr/bin/python3.10 /usr/bin/python +RUN ln -s /usr/lib/x86_64-linux-gnu/libjpeg.so /usr/lib + +RUN sed -i 's/PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config && \ + sed -i 's/Port 22/Port 25000/' /etc/ssh/sshd_config + +# SSH login fix. Otherwise user is kicked off after login +RUN sed 's@session\s*required\s*pam_loginuid.so@session optional pam_loginuid.so@g' -i /etc/pam.d/sshd + +RUN python3 -m pip install git-pylint-commit-hook osqp twine + +# NOTE: We need to pin the holoviews version to this since the latest version has a circular dependency on bokeh 2.0.0 through the panel package +RUN python3 -m pip install holoviews==1.18.3 netron jsonschema pandas==1.5.3 + +# Note: bokeh requires Pillow while we need to use Pillow-SIMD for performance reasons. +RUN python3 -m pip install bokeh==3.2.2 hvplot==0.9.2 + +# Remove onnxruntime install and replace with onnxruntime-gpu +RUN export ONNXRUNTIME_VER=$(python3 -c 'import onnxruntime; print(onnxruntime.__version__)') && \ + python3 -m pip uninstall -y onnxruntime && \ + python3 -m pip --no-cache-dir install onnxruntime-gpu==$ONNXRUNTIME_VER + +# Remove existing Pillow & Pillow-SIMD and replace with correct version of Pillow-SIMD. +RUN python3 -m pip uninstall -y Pillow Pillow-SIMD +RUN python3 -m pip --no-cache-dir install Pillow-SIMD==9.0.0.post1 + +# Force-install the LATEST version of Python3 Torch Packages, then pin back some dependencies +RUN unset PIP_CONFIG_FILE && \ + python3 -m pip install --upgrade --force-reinstall --isolated \ + torch -f https://download.pytorch.org/whl/cu118/torch \ + torchaudio -f https://download.pytorch.org/whl/cu118/torchaudio \ + torchvision -f https://download.pytorch.org/whl/cu118/torchvision \ + numpy==1.24.4 \ + fsspec[http]==2024.6.1 + +RUN apt-get update && apt-get install -y gnupg2 +# Downloaded from https://apt.llvm.org/ +RUN wget -O - http://llvm.org/apt/llvm-snapshot.gpg.key|sudo apt-key add - && echo "deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-14 main" >> /etc/apt/sources.list +RUN apt-get update --fix-missing -y && apt upgrade -y && apt-get install -y clang-11 clang-format clang-tidy-11 && \ + rm -rf /var/lib/apt/lists/* + +# Create a version-less symbolic link for clang-tidy +RUN ln -s /usr/bin/run-clang-tidy-11.py /usr/bin/run-clang-tidy.py + +# Provide write permission to the python package folder in order to install AIMET in editable mode +RUN chmod o+w /usr/local/lib/python3.10/dist-packages + +# Install cutlass 3.3.0 +RUN cd /usr/local && \ + git clone --depth 1 --branch v3.3.0 https://github.com/NVIDIA/cutlass.git && \ + mv cutlass cutlass-3.3.0 && \ + chown -R root:users cutlass-3.3.0 && \ + ln -s cutlass-3.3.0 cutlass diff --git a/Jenkins/Dockerfile.tf-cpu b/Jenkins/Dockerfile.tf-cpu index 2e79ffa4d46..73f853b519b 100644 --- a/Jenkins/Dockerfile.tf-cpu +++ b/Jenkins/Dockerfile.tf-cpu @@ -39,6 +39,7 @@ ARG REGISTRY FROM ${REGISTRY}ubuntu:jammy ARG DEBIAN_FRONTEND=noninteractive +ARG APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=DontWarn RUN apt-get update > /dev/null && \ apt-get install --no-install-recommends -y \ diff --git a/Jenkins/Dockerfile.tf-gpu b/Jenkins/Dockerfile.tf-gpu index ef7edc53aad..866325f06ad 100644 --- a/Jenkins/Dockerfile.tf-gpu +++ b/Jenkins/Dockerfile.tf-gpu @@ -157,7 +157,7 @@ RUN python3 -m pip --no-cache-dir install \ lmdb==0.95 \ nbsphinx \ networkx \ - 'numpy<1.24,>=1.20.5' \ + 'numpy<1.24,>=1.20.0' \ onnx==1.12.0 \ opencv-python \ Pillow==9.3.0 \ @@ -240,6 +240,7 @@ RUN python3 -m pip uninstall -y Pillow Pillow-SIMD RUN python3 -m pip --no-cache-dir install Pillow-SIMD==9.0.0.post1 RUN apt-get update && apt-get install -y gnupg2 +# Downloaded from https://apt.llvm.org/ RUN wget -O - http://llvm.org/apt/llvm-snapshot.gpg.key|sudo apt-key add - && echo "deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-14 main" >> /etc/apt/sources.list RUN apt-get update --fix-missing -y && apt upgrade -y && apt-get install -y clang-11 clang-format clang-tidy-11 && \ rm -rf /var/lib/apt/lists/* diff --git a/Jenkins/Dockerfile.tf-torch-cpu b/Jenkins/Dockerfile.tf-torch-cpu index e00094fc0e4..d65dd3aa3ee 100644 --- a/Jenkins/Dockerfile.tf-torch-cpu +++ b/Jenkins/Dockerfile.tf-torch-cpu @@ -39,6 +39,7 @@ ARG REGISTRY FROM ${REGISTRY}ubuntu:jammy ARG DEBIAN_FRONTEND=noninteractive +ARG APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=DontWarn RUN apt-get update > /dev/null && \ apt-get install --no-install-recommends -y \ diff --git a/Jenkins/Dockerfile.torch-cpu b/Jenkins/Dockerfile.torch-cpu index acf8368b4f7..53b18a5fd34 100644 --- a/Jenkins/Dockerfile.torch-cpu +++ b/Jenkins/Dockerfile.torch-cpu @@ -191,7 +191,7 @@ RUN python3 -m pip --no-cache-dir install \ tensorboardX==2.4 \ timm==0.4.12 \ torch==2.1.2+cpu -f https://download.pytorch.org/whl/torch_stable.html \ - torchaudio==2.1.2 -f https://download.pytorch.org/whl/torch_stable.html \ + torchaudio==2.1.2+cpu -f https://download.pytorch.org/whl/torch_stable.html \ torchtext \ torchvision==0.16.2+cpu -f https://download.pytorch.org/whl/torch_stable.html \ tqdm \ diff --git a/Jenkins/Dockerfile.torch-gpu b/Jenkins/Dockerfile.torch-gpu index 162fb4b8ebe..3d6e1b20d26 100644 --- a/Jenkins/Dockerfile.torch-gpu +++ b/Jenkins/Dockerfile.torch-gpu @@ -266,6 +266,7 @@ RUN python3 -m pip uninstall -y Pillow Pillow-SIMD RUN python3 -m pip --no-cache-dir install Pillow-SIMD==9.0.0.post1 RUN apt-get update && apt-get install -y gnupg2 +# Downloaded from https://apt.llvm.org/ RUN wget -O - http://llvm.org/apt/llvm-snapshot.gpg.key|sudo apt-key add - && echo "deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-14 main" >> /etc/apt/sources.list RUN apt-get update --fix-missing -y && apt upgrade -y && apt-get install -y clang-11 clang-format clang-tidy-11 && \ rm -rf /var/lib/apt/lists/* diff --git a/packaging/dependencies/onnx-cpu/reqs_deb_torch_common.txt b/packaging/dependencies/onnx-cpu/reqs_deb_torch_common.txt deleted file mode 120000 index f1c2ee49a3c..00000000000 --- a/packaging/dependencies/onnx-cpu/reqs_deb_torch_common.txt +++ /dev/null @@ -1 +0,0 @@ -reqs_deb_onnx_common.txt \ No newline at end of file diff --git a/packaging/dependencies/onnx-cpu/reqs_pip_onnx_common.txt b/packaging/dependencies/onnx-cpu/reqs_pip_onnx_common.txt index 2ab5dc47bb1..318a02c3188 120000 --- a/packaging/dependencies/onnx-cpu/reqs_pip_onnx_common.txt +++ b/packaging/dependencies/onnx-cpu/reqs_pip_onnx_common.txt @@ -1 +1 @@ -../reqs_pip_torch_common_legacy.txt \ No newline at end of file +../reqs_pip_onnx_common.txt \ No newline at end of file diff --git a/packaging/dependencies/onnx-cpu/reqs_pip_onnx_cpu.txt b/packaging/dependencies/onnx-cpu/reqs_pip_onnx_cpu.txt index f5301c1d3a8..d364c41fe80 100644 --- a/packaging/dependencies/onnx-cpu/reqs_pip_onnx_cpu.txt +++ b/packaging/dependencies/onnx-cpu/reqs_pip_onnx_cpu.txt @@ -1,4 +1,4 @@ -cumm==0.2.8 -spconv==2.1.20 -torch==1.13.1+cpu -f https://download.pytorch.org/whl/torch_stable.html -torchvision==0.14.1+cpu -f https://download.pytorch.org/whl/torch_stable.html +cumm +spconv +torch +torchvision diff --git a/packaging/dependencies/onnx-cpu/reqs_pip_torch_common.txt b/packaging/dependencies/onnx-cpu/reqs_pip_torch_common.txt deleted file mode 120000 index de9f71b7b51..00000000000 --- a/packaging/dependencies/onnx-cpu/reqs_pip_torch_common.txt +++ /dev/null @@ -1 +0,0 @@ -reqs_pip_onnx_common.txt \ No newline at end of file diff --git a/packaging/dependencies/onnx-cpu/reqs_pip_torch_cpu.txt b/packaging/dependencies/onnx-cpu/reqs_pip_torch_cpu.txt deleted file mode 120000 index 805dbce81e4..00000000000 --- a/packaging/dependencies/onnx-cpu/reqs_pip_torch_cpu.txt +++ /dev/null @@ -1 +0,0 @@ -reqs_pip_onnx_cpu.txt \ No newline at end of file diff --git a/packaging/dependencies/onnx-gpu/reqs_deb_torch_common.txt b/packaging/dependencies/onnx-gpu/reqs_deb_onnx_common.txt similarity index 100% rename from packaging/dependencies/onnx-gpu/reqs_deb_torch_common.txt rename to packaging/dependencies/onnx-gpu/reqs_deb_onnx_common.txt diff --git a/packaging/dependencies/onnx-gpu/reqs_deb_onnx_gpu.txt b/packaging/dependencies/onnx-gpu/reqs_deb_onnx_gpu.txt index f47afeda48f..b3fd98130ec 100644 --- a/packaging/dependencies/onnx-gpu/reqs_deb_onnx_gpu.txt +++ b/packaging/dependencies/onnx-gpu/reqs_deb_onnx_gpu.txt @@ -1,9 +1,11 @@ -libcublas-11-7 -libcufft-11-7 -libcurand-11-7 -libcusolver-11-7 -libcusparse-11-7 -libcudnn8=8.5.0.96-1+cuda11.7 -libnccl-dev=2.13.4-1+cuda11.7 -libnccl2=2.13.4-1+cuda11.7 -cuda-command-line-tools-11-7 \ No newline at end of file +cuda-cudart-dev-11-8 +cuda-cudart-11-8 +libcublas-11-8 +libcufft-11-8 +libcurand-11-8 +libcusolver-11-8 +libcusparse-11-8 +libcudnn8=8.9.6.50-1+cuda11.8 +libnccl-dev=2.15.5-1+cuda11.8 +libnccl2=2.15.5-1+cuda11.8 +cuda-command-line-tools-11-8 \ No newline at end of file diff --git a/packaging/dependencies/onnx-gpu/reqs_deb_torch_gpu.txt b/packaging/dependencies/onnx-gpu/reqs_deb_torch_gpu.txt deleted file mode 120000 index 2206abe74e3..00000000000 --- a/packaging/dependencies/onnx-gpu/reqs_deb_torch_gpu.txt +++ /dev/null @@ -1 +0,0 @@ -reqs_deb_onnx_gpu.txt \ No newline at end of file diff --git a/packaging/dependencies/onnx-gpu/reqs_pip_onnx_common.txt b/packaging/dependencies/onnx-gpu/reqs_pip_onnx_common.txt index 2ab5dc47bb1..318a02c3188 120000 --- a/packaging/dependencies/onnx-gpu/reqs_pip_onnx_common.txt +++ b/packaging/dependencies/onnx-gpu/reqs_pip_onnx_common.txt @@ -1 +1 @@ -../reqs_pip_torch_common_legacy.txt \ No newline at end of file +../reqs_pip_onnx_common.txt \ No newline at end of file diff --git a/packaging/dependencies/onnx-gpu/reqs_pip_onnx_gpu.txt b/packaging/dependencies/onnx-gpu/reqs_pip_onnx_gpu.txt index d7de33b5b70..1ad9c3768e1 100644 --- a/packaging/dependencies/onnx-gpu/reqs_pip_onnx_gpu.txt +++ b/packaging/dependencies/onnx-gpu/reqs_pip_onnx_gpu.txt @@ -1,4 +1,4 @@ -cumm-cu111==0.2.8 -spconv-cu111==2.1.20 -torch==1.13.1+cu117 -f https://download.pytorch.org/whl/torch_stable.html -torchvision==0.14.1+cu117 -f https://download.pytorch.org/whl/torch_stable.html +cumm-cu118 +spconv-cu118 +torch +torchvision diff --git a/packaging/dependencies/onnx-gpu/reqs_pip_torch_common.txt b/packaging/dependencies/onnx-gpu/reqs_pip_torch_common.txt deleted file mode 120000 index de9f71b7b51..00000000000 --- a/packaging/dependencies/onnx-gpu/reqs_pip_torch_common.txt +++ /dev/null @@ -1 +0,0 @@ -reqs_pip_onnx_common.txt \ No newline at end of file diff --git a/packaging/dependencies/onnx-gpu/reqs_pip_torch_gpu.txt b/packaging/dependencies/onnx-gpu/reqs_pip_torch_gpu.txt deleted file mode 120000 index 3879cbe19e5..00000000000 --- a/packaging/dependencies/onnx-gpu/reqs_pip_torch_gpu.txt +++ /dev/null @@ -1 +0,0 @@ -reqs_pip_onnx_gpu.txt \ No newline at end of file diff --git a/packaging/dependencies/reqs_pip_onnx_common.txt b/packaging/dependencies/reqs_pip_onnx_common.txt new file mode 100644 index 00000000000..fdf062511c3 --- /dev/null +++ b/packaging/dependencies/reqs_pip_onnx_common.txt @@ -0,0 +1,14 @@ +cvxpy +cylp +matplotlib>=3 +networkx +numpy<=1.24.4,>=1.16.6 +onnx==1.16.1 +onnxruntime==1.18.1 +onnxruntime-extensions +onnxscript +onnxsim +pandas==1.4.3 +protobuf==3.20.2 +psutil +tensorboardX==2.4 diff --git a/packaging/dependencies/reqs_pip_torch_common_legacy.txt b/packaging/dependencies/reqs_pip_torch_common_legacy.txt index 06f102c1e77..c7b461af920 100644 --- a/packaging/dependencies/reqs_pip_torch_common_legacy.txt +++ b/packaging/dependencies/reqs_pip_torch_common_legacy.txt @@ -2,7 +2,7 @@ cvxpy cylp matplotlib>=3 networkx -numpy<1.24,>=1.16.6 +numpy<=1.24.4,>=1.16.6 onnx==1.16.1 onnxruntime==1.18.1 onnxruntime-extensions