[CI] Update images that are not related to binary release. (#9205)
* [CI] Update images that are not related to the binary release. - Update clang-tidy, prefer tools from the Ubuntu repository. - Update GPU image to 22.04. - Small cleanup to the tidy script. - Remove gpu_jvm, which seems to be unused.
This commit is contained in:
parent
c5677a2b2c
commit
8c174ef2d3
@ -1,5 +1,5 @@
|
|||||||
ARG CUDA_VERSION_ARG
|
ARG CUDA_VERSION_ARG
|
||||||
FROM nvidia/cuda:$CUDA_VERSION_ARG-devel-ubuntu20.04
|
FROM nvidia/cuda:$CUDA_VERSION_ARG-devel-ubuntu22.04
|
||||||
ARG CUDA_VERSION_ARG
|
ARG CUDA_VERSION_ARG
|
||||||
|
|
||||||
# Environment
|
# Environment
|
||||||
@ -7,22 +7,21 @@ ENV DEBIAN_FRONTEND noninteractive
|
|||||||
|
|
||||||
# Install all basic requirements
|
# Install all basic requirements
|
||||||
RUN \
|
RUN \
|
||||||
apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/3bf863cc.pub && \
|
apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/3bf863cc.pub && \
|
||||||
apt-get update && \
|
apt-get update && \
|
||||||
apt-get install -y tar unzip wget git build-essential python3 python3-pip software-properties-common \
|
apt-get install -y wget git python3 python3-pip software-properties-common \
|
||||||
apt-transport-https ca-certificates gnupg-agent && \
|
apt-transport-https ca-certificates gnupg-agent && \
|
||||||
wget -nv -O - https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add - && \
|
|
||||||
add-apt-repository -u 'deb http://apt.llvm.org/focal/ llvm-toolchain-focal-15 main' && \
|
|
||||||
apt-get update && \
|
|
||||||
apt-get install -y llvm-15 clang-tidy-15 clang-15 libomp-15-dev && \
|
apt-get install -y llvm-15 clang-tidy-15 clang-15 libomp-15-dev && \
|
||||||
wget -nv -nc https://cmake.org/files/v3.18/cmake-3.18.0-Linux-x86_64.sh --no-check-certificate && \
|
apt-get install -y cmake
|
||||||
bash cmake-3.18.0-Linux-x86_64.sh --skip-license --prefix=/usr
|
|
||||||
|
|
||||||
# Set default clang-tidy version
|
# Set default clang-tidy version
|
||||||
RUN \
|
RUN \
|
||||||
update-alternatives --install /usr/bin/clang-tidy clang-tidy /usr/bin/clang-tidy-15 100 && \
|
update-alternatives --install /usr/bin/clang-tidy clang-tidy /usr/bin/clang-tidy-15 100 && \
|
||||||
update-alternatives --install /usr/bin/clang clang /usr/bin/clang-15 100
|
update-alternatives --install /usr/bin/clang clang /usr/bin/clang-15 100
|
||||||
|
|
||||||
|
RUN \
|
||||||
|
apt-get install libgtest-dev libgmock-dev -y
|
||||||
|
|
||||||
# Install Python packages
|
# Install Python packages
|
||||||
RUN \
|
RUN \
|
||||||
pip3 install pyyaml
|
pip3 install pyyaml
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
ARG CUDA_VERSION_ARG
|
ARG CUDA_VERSION_ARG
|
||||||
FROM nvidia/cuda:$CUDA_VERSION_ARG-runtime-ubuntu18.04
|
FROM nvidia/cuda:$CUDA_VERSION_ARG-runtime-ubuntu22.04
|
||||||
ARG CUDA_VERSION_ARG
|
ARG CUDA_VERSION_ARG
|
||||||
ARG RAPIDS_VERSION_ARG
|
ARG RAPIDS_VERSION_ARG
|
||||||
|
|
||||||
@ -9,7 +9,7 @@ SHELL ["/bin/bash", "-c"] # Use Bash as shell
|
|||||||
|
|
||||||
# Install all basic requirements
|
# Install all basic requirements
|
||||||
RUN \
|
RUN \
|
||||||
apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/3bf863cc.pub && \
|
apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/3bf863cc.pub && \
|
||||||
apt-get update && \
|
apt-get update && \
|
||||||
apt-get install -y wget unzip bzip2 libgomp1 build-essential openjdk-8-jdk-headless && \
|
apt-get install -y wget unzip bzip2 libgomp1 build-essential openjdk-8-jdk-headless && \
|
||||||
# Python
|
# Python
|
||||||
|
|||||||
@ -1,53 +0,0 @@
|
|||||||
ARG CUDA_VERSION_ARG
|
|
||||||
FROM nvidia/cuda:$CUDA_VERSION_ARG-runtime-ubuntu16.04
|
|
||||||
ARG CUDA_VERSION_ARG
|
|
||||||
ARG JDK_VERSION=8
|
|
||||||
ARG SPARK_VERSION=3.0.0
|
|
||||||
|
|
||||||
# Environment
|
|
||||||
ENV DEBIAN_FRONTEND noninteractive
|
|
||||||
|
|
||||||
# Install all basic requirements
|
|
||||||
RUN \
|
|
||||||
apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/3bf863cc.pub && \
|
|
||||||
apt-get update && \
|
|
||||||
apt-get install -y software-properties-common && \
|
|
||||||
add-apt-repository ppa:openjdk-r/ppa && \
|
|
||||||
apt-get update && \
|
|
||||||
apt-get install -y tar unzip wget openjdk-$JDK_VERSION-jdk libgomp1 && \
|
|
||||||
# Python
|
|
||||||
wget -nv -O conda.sh https://github.com/conda-forge/miniforge/releases/download/22.11.1-2/Mambaforge-22.11.1-2-Linux-x86_64.sh && \
|
|
||||||
bash conda.sh -b -p /opt/mambaforge && \
|
|
||||||
/opt/mambaforge/bin/pip install awscli && \
|
|
||||||
# Maven
|
|
||||||
wget -nv https://archive.apache.org/dist/maven/maven-3/3.6.1/binaries/apache-maven-3.6.1-bin.tar.gz && \
|
|
||||||
tar xvf apache-maven-3.6.1-bin.tar.gz -C /opt && \
|
|
||||||
ln -s /opt/apache-maven-3.6.1/ /opt/maven && \
|
|
||||||
# Spark
|
|
||||||
wget -nv https://archive.apache.org/dist/spark/spark-$SPARK_VERSION/spark-$SPARK_VERSION-bin-hadoop2.7.tgz && \
|
|
||||||
tar xvf spark-$SPARK_VERSION-bin-hadoop2.7.tgz -C /opt && \
|
|
||||||
ln -s /opt/spark-$SPARK_VERSION-bin-hadoop2.7 /opt/spark
|
|
||||||
|
|
||||||
ENV PATH=/opt/mambaforge/bin:/opt/spark/bin:/opt/maven/bin:$PATH
|
|
||||||
|
|
||||||
# Install Python packages
|
|
||||||
RUN \
|
|
||||||
pip install numpy scipy pandas scikit-learn
|
|
||||||
|
|
||||||
ENV GOSU_VERSION 1.10
|
|
||||||
|
|
||||||
# Install lightweight sudo (not bound to TTY)
|
|
||||||
RUN set -ex; \
|
|
||||||
wget -nv -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-amd64" && \
|
|
||||||
chmod +x /usr/local/bin/gosu && \
|
|
||||||
gosu nobody true
|
|
||||||
|
|
||||||
# Set default JDK version
|
|
||||||
RUN update-java-alternatives -v -s java-1.$JDK_VERSION.0-openjdk-amd64
|
|
||||||
|
|
||||||
# Default entry-point to use if running locally
|
|
||||||
# It will preserve attributes of created files
|
|
||||||
COPY entrypoint.sh /scripts/
|
|
||||||
|
|
||||||
WORKDIR /workspace
|
|
||||||
ENTRYPOINT ["/scripts/entrypoint.sh"]
|
|
||||||
@ -41,7 +41,7 @@ class ClangTidy(object):
|
|||||||
def __init__(self, args):
|
def __init__(self, args):
|
||||||
self.cpp_lint = args.cpp
|
self.cpp_lint = args.cpp
|
||||||
self.cuda_lint = args.cuda
|
self.cuda_lint = args.cuda
|
||||||
self.use_dmlc_gtest = args.use_dmlc_gtest
|
self.use_dmlc_gtest: bool = args.use_dmlc_gtest
|
||||||
self.cuda_archs = args.cuda_archs.copy() if args.cuda_archs else []
|
self.cuda_archs = args.cuda_archs.copy() if args.cuda_archs else []
|
||||||
|
|
||||||
if args.tidy_version:
|
if args.tidy_version:
|
||||||
@ -202,6 +202,7 @@ class ClangTidy(object):
|
|||||||
cdb_file = os.path.join(self.cdb_path, 'compile_commands.json')
|
cdb_file = os.path.join(self.cdb_path, 'compile_commands.json')
|
||||||
with open(cdb_file, 'r') as fd:
|
with open(cdb_file, 'r') as fd:
|
||||||
self.compile_commands = json.load(fd)
|
self.compile_commands = json.load(fd)
|
||||||
|
|
||||||
tidy_file = os.path.join(self.root_path, '.clang-tidy')
|
tidy_file = os.path.join(self.root_path, '.clang-tidy')
|
||||||
with open(tidy_file) as fd:
|
with open(tidy_file) as fd:
|
||||||
self.clang_tidy = yaml.safe_load(fd)
|
self.clang_tidy = yaml.safe_load(fd)
|
||||||
@ -276,16 +277,24 @@ right keywords?
|
|||||||
print('clang-tidy is working.')
|
print('clang-tidy is working.')
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == "__main__":
|
||||||
parser = argparse.ArgumentParser(description='Run clang-tidy.')
|
parser = argparse.ArgumentParser(description="Run clang-tidy.")
|
||||||
parser.add_argument('--cpp', type=int, default=1)
|
parser.add_argument("--cpp", type=int, default=1)
|
||||||
parser.add_argument('--tidy-version', type=int, default=None,
|
parser.add_argument(
|
||||||
help='Specify the version of preferred clang-tidy.')
|
"--tidy-version",
|
||||||
parser.add_argument('--cuda', type=int, default=1)
|
type=int,
|
||||||
parser.add_argument('--use-dmlc-gtest', type=int, default=1,
|
default=None,
|
||||||
help='Whether to use gtest bundled in dmlc-core.')
|
help="Specify the version of preferred clang-tidy.",
|
||||||
parser.add_argument('--cuda-archs', action='append',
|
)
|
||||||
help='List of CUDA archs to build')
|
parser.add_argument("--cuda", type=int, default=1)
|
||||||
|
parser.add_argument(
|
||||||
|
"--use-dmlc-gtest",
|
||||||
|
action="store_true",
|
||||||
|
help="Whether to use gtest bundled in dmlc-core.",
|
||||||
|
)
|
||||||
|
parser.add_argument(
|
||||||
|
"--cuda-archs", action="append", help="List of CUDA archs to build"
|
||||||
|
)
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
|
|
||||||
test_tidy(args)
|
test_tidy(args)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user