Skip to content

Commit 73328f2

Browse files
committed
ci: refactor build
Signed-off-by: thxCode <[email protected]>
1 parent 8f76f93 commit 73328f2

File tree

11 files changed

+834
-22
lines changed

11 files changed

+834
-22
lines changed

.github/workflows/build-devops-images.yml

+348-22
Large diffs are not rendered by default.

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.DS_Store

cann/ubuntu/Dockerfile.suffix

+49
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
2+
# SOURCE
3+
RUN apt-get update -y \
4+
&& apt-get install -y software-properties-common \
5+
&& add-apt-repository -y ppa:ubuntu-toolchain-r/test \
6+
&& apt-get update -y
7+
8+
# MAKE & CCACHE & CURL & GIT
9+
RUN apt-get install -y make ccache curl git \
10+
&& make --version \
11+
&& ccache --version \
12+
&& curl --version \
13+
&& git --version
14+
15+
# CMAKE
16+
ENV CMAKE_VERSION=3.22.1
17+
RUN curl -sL "https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/cmake-${CMAKE_VERSION}-linux-$(uname -m).tar.gz" | tar -zx -C /usr --strip-components 1 \
18+
&& cmake --version
19+
20+
# GCC
21+
RUN apt-get install -y binutils pkg-config gcc-11 g++-11 \
22+
&& update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-11 10 \
23+
&& update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-11 10 \
24+
&& ldconfig -v \
25+
&& gcc --version
26+
RUN apt-get install -y build-essential
27+
28+
# OPENSSL
29+
ENV OPENSSL_VESION=3.4.0 \
30+
PKG_CONFIG_PATH="/usr/local/openssl/lib/pkgconfig:/usr/local/openssl/lib64/pkgconfig:$PKG_CONFIG_PATH" \
31+
LD_LIBRARY_PATH="/usr/local/openssl/lib:/usr/local/openssl/lib64:$LD_LIBRARY_PATH"
32+
RUN apt-get install -y zlib1g-dev perl \
33+
&& curl -sL "https://github.com/openssl/openssl/releases/download/openssl-${OPENSSL_VESION}/openssl-${OPENSSL_VESION}.tar.gz" | tar -zx -C /tmp \
34+
&& loc=$(pwd) && cd /tmp/openssl-${OPENSSL_VESION} \
35+
&& ./config --prefix=/usr/local/openssl --openssldir=/etc/ssl shared zlib enable-ssl3 enable-ssl3-method enable-mdc2 enable-md2 \
36+
&& make -j $(nproc) build_sw && make -j $(nproc) install_sw \
37+
&& cd ${local} && rm -rf /tmp/openssl-${OPENSSL_VESION} \
38+
&& ln -vsf /usr/local/openssl/bin/* /usr/bin/ \
39+
&& ln -vsf /usr/local/openssl/include/openssl /usr/include/openssl \
40+
&& echo "/usr/local/openssl/lib" >> /etc/ld.so.conf \
41+
&& echo "/usr/local/openssl/lib64" >> /etc/ld.so.conf \
42+
&& ldconfig -v \
43+
&& openssl --version
44+
45+
# OPENBLAS
46+
RUN apt-get install -y libopenblas-dev
47+
48+
# OPENMP
49+
RUN apt-get install -y libgomp1 libomp-dev

cpu/centos/Dockerfile

+71
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
ARG BASE_VERSION=7
2+
3+
4+
FROM centos:${BASE_VERSION}
5+
SHELL ["/bin/bash", "-c"]
6+
7+
# SOURCE
8+
RUN sed -i s/mirror.centos.org/vault.centos.org/g /etc/yum.repos.d/*.repo \
9+
&& sed -i s/^#.*baseurl=http/baseurl=http/g /etc/yum.repos.d/*.repo \
10+
&& sed -i s/^mirrorlist=http/#mirrorlist=http/g /etc/yum.repos.d/*.repo
11+
RUN yum install -y centos-release-scl \
12+
&& sed -i s/mirror.centos.org/vault.centos.org/g /etc/yum.repos.d/*.repo \
13+
&& sed -i s/^#.*baseurl=http/baseurl=http/g /etc/yum.repos.d/*.repo \
14+
&& sed -i s/^mirrorlist=http/#mirrorlist=http/g /etc/yum.repos.d/*.repo \
15+
&& yum update -y
16+
RUN yum install -y epel-release --enablerepo=extras \
17+
&& yum install -y https://packages.endpointdev.com/rhel/7/os/$(uname -m)/endpoint-repo.$(uname -m).rpm \
18+
&& yum update -y
19+
20+
# MAKE & CCACHE & CURL & GIT
21+
RUN yum install -y make ccache curl git \
22+
&& make --version \
23+
&& ccache --version \
24+
&& curl --version \
25+
&& git --version
26+
27+
# CMAKE
28+
ENV CMAKE_VERSION=3.22.1
29+
RUN curl -sL "https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/cmake-${CMAKE_VERSION}-linux-$(uname -m).tar.gz" | tar -zx -C /usr --strip-components 1 \
30+
&& cmake --version
31+
32+
# GCC
33+
ENV PKG_CONFIG_PATH="/opt/rh/devtoolset-9/root/usr/lib/pkgconfig:/opt/rh/devtoolset-9/root/usr/lib64/pkgconfig:$PKG_CONFIG_PATH" \
34+
LD_LIBRARY_PATH="/opt/rh/devtoolset-9/root/usr/lib:/opt/rh/devtoolset-9/root/usr/lib/dyninst:/opt/rh/devtoolset-9/root/usr/lib64:/opt/rh/devtoolset-9/root/usr/lib64/dyninst:$LD_LIBRARY_PATH"
35+
RUN yum install -y devtoolset-9 devtoolset-9-libatomic-devel devtoolset-9-elfutils-libelf-devel \
36+
&& ln -vsf /opt/rh/devtoolset-9/root/bin/* /usr/bin/ \
37+
&& echo "/opt/rh/devtoolset-9/root/usr/lib" >> /etc/ld.so.conf \
38+
&& echo "/opt/rh/devtoolset-9/root/usr/lib64" >> /etc/ld.so.conf \
39+
&& ldconfig -v \
40+
&& gcc --version
41+
RUN yum install -y glibc-static libstdc++-static
42+
43+
# OPENSSL
44+
ENV OPENSSL_VESION=3.4.0 \
45+
PKG_CONFIG_PATH="/usr/local/openssl/lib/pkgconfig:/usr/local/openssl/lib64/pkgconfig:$PKG_CONFIG_PATH" \
46+
LD_LIBRARY_PATH="/usr/local/openssl/lib:/usr/local/openssl/lib64:$LD_LIBRARY_PATH"
47+
RUN yum install -y zlib-devel perl perl-IPC-Cmd perl-Test-Simple perl-CPAN \
48+
&& curl -sL "https://github.com/openssl/openssl/releases/download/openssl-${OPENSSL_VESION}/openssl-${OPENSSL_VESION}.tar.gz" | tar -zx -C /tmp \
49+
&& loc=$(pwd) && cd /tmp/openssl-${OPENSSL_VESION} \
50+
&& ./config --prefix=/usr/local/openssl --openssldir=/etc/ssl shared zlib enable-ssl3 enable-ssl3-method enable-mdc2 enable-md2 \
51+
&& make -j $(nproc) build_sw && make -j $(nproc) install_sw \
52+
&& cd ${local} && rm -rf /tmp/openssl-${OPENSSL_VESION} \
53+
&& ln -vsf /usr/local/openssl/bin/* /usr/bin/ \
54+
&& ln -vsf /usr/local/openssl/include/openssl /usr/include/openssl \
55+
&& echo "/usr/local/openssl/lib" >> /etc/ld.so.conf \
56+
&& echo "/usr/local/openssl/lib64" >> /etc/ld.so.conf \
57+
&& ldconfig -v \
58+
&& openssl --version
59+
60+
# OPENBLAS
61+
RUN yum install -y openblas-static
62+
COPY <<EOF /usr/lib64/pkgconfig/openblas.pc
63+
Name: OpenBLAS
64+
Description: OpenBLAS library
65+
Version: 0.3.3
66+
Libs: -L/usr/lib64 -lopenblas
67+
Cflags: -I/usr/include/openblas
68+
EOF
69+
70+
# OPENMP
71+
RUN yum install -y libgomp openmpi openmpi-devel

cpu/rockylinux/Dockerfile

+55
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
ARG BASE_VERSION=8.9
2+
3+
4+
FROM rockylinux:${BASE_VERSION}
5+
6+
# SOURCE
7+
RUN dnf install -y epel-release \
8+
&& dnf config-manager --set-enabled powertools
9+
10+
# MAKE & CCACHE & CURL & GIT
11+
RUN yum install -y make ccache curl git \
12+
&& make --version \
13+
&& ccache --version \
14+
&& curl --version \
15+
&& git --version
16+
17+
# CMAKE
18+
ENV CMAKE_VERSION=3.22.1
19+
RUN curl -sL "https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/cmake-${CMAKE_VERSION}-linux-$(uname -m).tar.gz" | tar -zx -C /usr --strip-components 1 \
20+
&& cmake --version
21+
22+
# GCC
23+
ENV PKG_CONFIG_PATH="/opt/rh/gcc-toolset-11/root/usr/lib/pkgconfig:/opt/rh/gcc-toolset-11/root/usr/lib64/pkgconfig:$PKG_CONFIG_PATH" \
24+
LD_LIBRARY_PATH="/opt/rh/gcc-toolset-11/root/usr/lib:/opt/rh/gcc-toolset-11/root/usr/lib/dyninst:/opt/rh/gcc-toolset-11/root/usr/lib64:/opt/rh/gcc-toolset-11/root/usr/lib64/dyninst:$LD_LIBRARY_PATH"
25+
RUN dnf install -y binutils pkgconfig gcc gcc-c++ gcc-toolset-11 \
26+
&& ln -vsf /opt/rh/gcc-toolset-11/root/bin/* /usr/bin/ \
27+
&& echo "/opt/rh/gcc-toolset-11/root/usr/lib" >> /etc/ld.so.conf \
28+
&& echo "/opt/rh/gcc-toolset-11/root/usr/lib64" >> /etc/ld.so.conf \
29+
&& ldconfig -v \
30+
&& gcc --version
31+
RUN dnf install -y glibc-static libstdc++-static
32+
33+
# OPENSSL
34+
ENV OPENSSL_VESION=3.4.0 \
35+
PKG_CONFIG_PATH="/usr/local/openssl/lib/pkgconfig:/usr/local/openssl/lib64/pkgconfig:$PKG_CONFIG_PATH" \
36+
LD_LIBRARY_PATH="/usr/local/openssl/lib:/usr/local/openssl/lib64:$LD_LIBRARY_PATH"
37+
RUN dnf install -y zlib-devel perl \
38+
&& curl -sL "https://github.com/openssl/openssl/releases/download/openssl-${OPENSSL_VESION}/openssl-${OPENSSL_VESION}.tar.gz" | tar -zx -C /tmp \
39+
&& loc=$(pwd) && cd /tmp/openssl-${OPENSSL_VESION} \
40+
&& ./config --prefix=/usr/local/openssl --openssldir=/etc/ssl shared zlib enable-ssl3 enable-ssl3-method enable-mdc2 enable-md2 \
41+
&& make -j $(nproc) build_sw && make -j $(nproc) install_sw \
42+
&& cd ${local} && rm -rf /tmp/openssl-${OPENSSL_VESION} \
43+
&& ln -vsf /usr/local/openssl/bin/* /usr/bin/ \
44+
&& ln -vsf /usr/local/openssl/include/openssl /usr/include/openssl \
45+
&& echo "/usr/local/openssl/lib" >> /etc/ld.so.conf \
46+
&& echo "/usr/local/openssl/lib64" >> /etc/ld.so.conf \
47+
&& ldconfig -v \
48+
&& openssl --version
49+
50+
# OPENBLAS
51+
RUN dnf install -y openblas-static
52+
53+
# OPENMP
54+
RUN yum install -y libgomp openmpi openmpi-devel
55+

cpu/ubuntu/Dockerfile

+53
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
ARG BASE_VERSION=18.04
2+
3+
4+
FROM ubuntu:${BASE_VERSION}
5+
6+
# SOURCE
7+
RUN apt-get update -y \
8+
&& apt-get install -y software-properties-common \
9+
&& add-apt-repository -y ppa:ubuntu-toolchain-r/test \
10+
&& apt-get update -y
11+
12+
# MAKE & CCACHE & CURL & GIT
13+
RUN apt-get install -y make ccache curl git \
14+
&& make --version \
15+
&& ccache --version \
16+
&& curl --version \
17+
&& git --version
18+
19+
# CMAKE
20+
ENV CMAKE_VERSION=3.22.1
21+
RUN curl -sL "https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/cmake-${CMAKE_VERSION}-linux-$(uname -m).tar.gz" | tar -zx -C /usr --strip-components 1 \
22+
&& cmake --version
23+
24+
# GCC
25+
RUN apt-get install -y binutils pkg-config gcc-11 g++-11 \
26+
&& update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-11 10 \
27+
&& update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-11 10 \
28+
&& ldconfig -v \
29+
&& gcc --version
30+
RUN apt-get install -y build-essential
31+
32+
# OPENSSL
33+
ENV OPENSSL_VESION=3.4.0 \
34+
PKG_CONFIG_PATH="/usr/local/openssl/lib/pkgconfig:/usr/local/openssl/lib64/pkgconfig:$PKG_CONFIG_PATH" \
35+
LD_LIBRARY_PATH="/usr/local/openssl/lib:/usr/local/openssl/lib64:$LD_LIBRARY_PATH"
36+
RUN apt-get install -y zlib1g-dev perl \
37+
&& curl -sL "https://github.com/openssl/openssl/releases/download/openssl-${OPENSSL_VESION}/openssl-${OPENSSL_VESION}.tar.gz" | tar -zx -C /tmp \
38+
&& loc=$(pwd) && cd /tmp/openssl-${OPENSSL_VESION} \
39+
&& ./config --prefix=/usr/local/openssl --openssldir=/etc/ssl shared zlib enable-ssl3 enable-ssl3-method enable-mdc2 enable-md2 \
40+
&& make -j $(nproc) build_sw && make -j $(nproc) install_sw \
41+
&& cd ${local} && rm -rf /tmp/openssl-${OPENSSL_VESION} \
42+
&& ln -vsf /usr/local/openssl/bin/* /usr/bin/ \
43+
&& ln -vsf /usr/local/openssl/include/openssl /usr/include/openssl \
44+
&& echo "/usr/local/openssl/lib" >> /etc/ld.so.conf \
45+
&& echo "/usr/local/openssl/lib64" >> /etc/ld.so.conf \
46+
&& ldconfig -v \
47+
&& openssl --version
48+
49+
# OPENBLAS
50+
RUN apt-get install -y libopenblas-dev
51+
52+
# OPENMP
53+
RUN apt-get install -y libgomp1 libomp-dev

cuda/centos/Dockerfile

+70
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
ARG CUDA_VERSION=12.4.0
2+
ARG BASE_VERSION=7
3+
4+
FROM nvidia/cuda:${CUDA_VERSION}-devel-centos${BASE_VERSION}
5+
6+
# SOURCE
7+
RUN sed -i s/mirror.centos.org/vault.centos.org/g /etc/yum.repos.d/*.repo \
8+
&& sed -i s/^#.*baseurl=http/baseurl=http/g /etc/yum.repos.d/*.repo \
9+
&& sed -i s/^mirrorlist=http/#mirrorlist=http/g /etc/yum.repos.d/*.repo
10+
RUN yum install -y centos-release-scl \
11+
&& sed -i s/mirror.centos.org/vault.centos.org/g /etc/yum.repos.d/*.repo \
12+
&& sed -i s/^#.*baseurl=http/baseurl=http/g /etc/yum.repos.d/*.repo \
13+
&& sed -i s/^mirrorlist=http/#mirrorlist=http/g /etc/yum.repos.d/*.repo \
14+
&& yum update -y
15+
RUN yum install -y epel-release --enablerepo=extras \
16+
&& yum install -y https://packages.endpointdev.com/rhel/7/os/$(uname -m)/endpoint-repo.$(uname -m).rpm \
17+
&& yum update -y
18+
19+
# MAKE & CCACHE & CURL & GIT
20+
RUN yum install -y make ccache curl git \
21+
&& make --version \
22+
&& ccache --version \
23+
&& curl --version \
24+
&& git --version
25+
26+
# CMAKE
27+
ENV CMAKE_VERSION=3.22.1
28+
RUN curl -sL "https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/cmake-${CMAKE_VERSION}-linux-$(uname -m).tar.gz" | tar -zx -C /usr --strip-components 1 \
29+
&& cmake --version
30+
31+
# GCC
32+
ENV PKG_CONFIG_PATH="/opt/rh/devtoolset-9/root/usr/lib/pkgconfig:/opt/rh/devtoolset-9/root/usr/lib64/pkgconfig:$PKG_CONFIG_PATH" \
33+
LD_LIBRARY_PATH="/opt/rh/devtoolset-9/root/usr/lib:/opt/rh/devtoolset-9/root/usr/lib/dyninst:/opt/rh/devtoolset-9/root/usr/lib64:/opt/rh/devtoolset-9/root/usr/lib64/dyninst:$LD_LIBRARY_PATH"
34+
RUN yum install -y devtoolset-9 devtoolset-9-libatomic-devel devtoolset-9-elfutils-libelf-devel \
35+
&& ln -vsf /opt/rh/devtoolset-9/root/bin/* /usr/bin/ \
36+
&& echo "/opt/rh/devtoolset-9/root/usr/lib" >> /etc/ld.so.conf \
37+
&& echo "/opt/rh/devtoolset-9/root/usr/lib64" >> /etc/ld.so.conf \
38+
&& ldconfig -v \
39+
&& gcc --version
40+
RUN yum install -y glibc-static libstdc++-static
41+
42+
# OPENSSL
43+
ENV OPENSSL_VESION=3.4.0 \
44+
PKG_CONFIG_PATH="/usr/local/openssl/lib/pkgconfig:/usr/local/openssl/lib64/pkgconfig:$PKG_CONFIG_PATH" \
45+
LD_LIBRARY_PATH="/usr/local/openssl/lib:/usr/local/openssl/lib64:$LD_LIBRARY_PATH"
46+
RUN yum install -y zlib-devel perl perl-IPC-Cmd perl-Test-Simple perl-CPAN \
47+
&& curl -sL "https://github.com/openssl/openssl/releases/download/openssl-${OPENSSL_VESION}/openssl-${OPENSSL_VESION}.tar.gz" | tar -zx -C /tmp \
48+
&& loc=$(pwd) && cd /tmp/openssl-${OPENSSL_VESION} \
49+
&& ./config --prefix=/usr/local/openssl --openssldir=/etc/ssl shared zlib enable-ssl3 enable-ssl3-method enable-mdc2 enable-md2 \
50+
&& make -j $(nproc) build_sw && make -j $(nproc) install_sw \
51+
&& cd ${local} && rm -rf /tmp/openssl-${OPENSSL_VESION} \
52+
&& ln -vsf /usr/local/openssl/bin/* /usr/bin/ \
53+
&& ln -vsf /usr/local/openssl/include/openssl /usr/include/openssl \
54+
&& echo "/usr/local/openssl/lib" >> /etc/ld.so.conf \
55+
&& echo "/usr/local/openssl/lib64" >> /etc/ld.so.conf \
56+
&& ldconfig -v \
57+
&& openssl --version
58+
59+
# OPENBLAS
60+
RUN yum install -y openblas-static
61+
COPY <<EOF /usr/lib64/pkgconfig/openblas.pc
62+
Name: OpenBLAS
63+
Description: OpenBLAS library
64+
Version: 0.3.3
65+
Libs: -L/usr/lib64 -lopenblas
66+
Cflags: -I/usr/include/openblas
67+
EOF
68+
69+
# OPENMP
70+
RUN yum install -y libgomp openmpi openmpi-devel

dtk/ubuntu/Dockerfile

+53
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
ARG DTK_VERSION=24.04.3
2+
ARG BASE_VERSION=20.04
3+
4+
FROM image.sourcefind.cn:5000/dcu/admin/base/dtk:${DTK_VERSION}-py3.8-ubuntu${BASE_VERSION}
5+
6+
# SOURCE
7+
RUN apt-get update -y \
8+
&& apt-get install -y software-properties-common \
9+
&& add-apt-repository -y ppa:ubuntu-toolchain-r/test \
10+
&& apt-get update -y
11+
12+
# MAKE & CCACHE & CURL & GIT
13+
RUN apt-get install -y make ccache curl git \
14+
&& make --version \
15+
&& ccache --version \
16+
&& curl --version \
17+
&& git --version
18+
19+
# CMAKE
20+
ENV CMAKE_VERSION=3.22.1
21+
RUN curl -sL "https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/cmake-${CMAKE_VERSION}-linux-$(uname -m).tar.gz" | tar -zx -C /usr --strip-components 1 \
22+
&& cmake --version
23+
24+
# GCC
25+
RUN apt-get install -y binutils pkg-config gcc-11 g++-11 \
26+
&& update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-11 10 \
27+
&& update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-11 10 \
28+
&& ldconfig -v \
29+
&& gcc --version
30+
RUN apt-get install -y build-essential
31+
32+
# OPENSSL
33+
ENV OPENSSL_VESION=3.4.0 \
34+
PKG_CONFIG_PATH="/usr/local/openssl/lib/pkgconfig:/usr/local/openssl/lib64/pkgconfig:$PKG_CONFIG_PATH" \
35+
LD_LIBRARY_PATH="/usr/local/openssl/lib:/usr/local/openssl/lib64:$LD_LIBRARY_PATH"
36+
RUN apt-get install -y zlib1g-dev perl \
37+
&& curl -sL "https://github.com/openssl/openssl/releases/download/openssl-${OPENSSL_VESION}/openssl-${OPENSSL_VESION}.tar.gz" | tar -zx -C /tmp \
38+
&& loc=$(pwd) && cd /tmp/openssl-${OPENSSL_VESION} \
39+
&& ./config --prefix=/usr/local/openssl --openssldir=/etc/ssl shared zlib enable-ssl3 enable-ssl3-method enable-mdc2 enable-md2 \
40+
&& make -j $(nproc) build_sw && make -j $(nproc) install_sw \
41+
&& cd ${local} && rm -rf /tmp/openssl-${OPENSSL_VESION} \
42+
&& ln -vsf /usr/local/openssl/bin/* /usr/bin/ \
43+
&& ln -vsf /usr/local/openssl/include/openssl /usr/include/openssl \
44+
&& echo "/usr/local/openssl/lib" >> /etc/ld.so.conf \
45+
&& echo "/usr/local/openssl/lib64" >> /etc/ld.so.conf \
46+
&& ldconfig -v \
47+
&& openssl --version
48+
49+
# OPENBLAS
50+
RUN apt-get install -y libopenblas-dev
51+
52+
# OPENMP
53+
RUN apt-get install -y libgomp1 libomp-dev

0 commit comments

Comments
 (0)