Skip to content

Commit

Permalink
Add arm64 release ci docker (#56)
Browse files Browse the repository at this point in the history
* Multiarch release ci

* split

* update

* fix

* update

* Update release-ci
  • Loading branch information
anakinxc authored Dec 11, 2023
1 parent 343cf92 commit b038fce
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 66 deletions.
21 changes: 0 additions & 21 deletions dockerfiles/build_llvm.sh

This file was deleted.

55 changes: 21 additions & 34 deletions dockerfiles/release-ci-aarch64.DockerFile
Original file line number Diff line number Diff line change
@@ -1,47 +1,38 @@
FROM centos:centos8

# GCC version
ARG DEVTOOLSET_VERSION=11

RUN cd /etc/yum.repos.d/ \
&& sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-* \
&& sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-*

RUN yum update -y \
&& sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-* \
&& yum update -y \
&& yum install -y dnf-plugins-core \
&& yum config-manager --set-enabled powertools \
&& yum clean all

RUN yum config-manager --set-enabled powertools

# install devtools and [enable it](https://access.redhat.com/solutions/527703)
RUN yum install -y \
gcc-toolset-${DEVTOOLSET_VERSION}-gcc \
gcc-toolset-${DEVTOOLSET_VERSION}-gcc-c++ \
gcc-toolset-${DEVTOOLSET_VERSION}-binutils \
git vim-common wget unzip which java-11-openjdk-devel.aarch64 \
git vim-common wget unzip which java-11-openjdk-devel \
libtool autoconf make ninja-build \
&& yum clean all \
&& echo "source scl_source enable gcc-toolset-${DEVTOOLSET_VERSION}" > /etc/profile.d/enable_gcc_toolset.sh

ENV PATH="/opt/rh/gcc-toolset-${DEVTOOLSET_VERSION}/root/usr/bin:${PATH}"

RUN wget https://github.com/Kitware/CMake/releases/download/v3.26.3/cmake-3.26.3-linux-aarch64.sh \
&& sh cmake-3.26.3-linux-aarch64.sh --prefix=/usr --skip-license \
&& rm -f cmake-3.26.3-linux-aarch64.sh
&& yum clean all

# install conda
RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-aarch64.sh \
&& bash Miniconda3-latest-Linux-aarch64.sh -b \
&& rm -f Miniconda3-latest-Linux-aarch64.sh \
&& /root/miniconda3/bin/conda init bash
&& /root/miniconda3/bin/conda init

# install go
ARG GO_VERSION=1.19.10
ARG GO_SHA256SUM="df98698821211c819e8b2420c77a0f802d989e377718578a31b1f91f6be2c5b4"
# Add conda to path
ENV PATH="/root/miniconda3/bin:${PATH}"

# Install lld
RUN /root/miniconda3/bin/conda install -c conda-forge lld nasm cmake gxx==11.4.0 -y \
&& /root/miniconda3/bin/conda clean -afy

# install Rust
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y

# install go
RUN set -eux; \
url="https://golang.google.cn/dl/go${GO_VERSION}.linux-arm64.tar.gz"; \
ARG GO_VERSION=1.21.4
ARG GO_SHA256SUM=ce1983a7289856c3a918e1fd26d41e072cc39f928adfb11ba1896440849b95da
RUN url="https://golang.google.cn/dl/go${GO_VERSION}.linux-arm64.tar.gz"; \
wget --no-check-certificate -O go.tgz "$url"; \
echo "${GO_SHA256SUM} *go.tgz" | sha256sum -c -; \
tar -C /usr/local -xzf go.tgz; \
Expand All @@ -51,13 +42,9 @@ ENV GOPATH="/usr/local"
ENV PATH="/usr/local/go/bin:${GOPATH}/bin:${PATH}"

# install bazel
# RUN wget https://github.com/bazelbuild/bazel/releases/download/5.4.1/bazel-5.4.1-linux-arm64 \
RUN wget https://mirrors.huaweicloud.com/bazel/5.4.1/bazel-5.4.1-linux-arm64 \
&& mv bazel-5.4.1-linux-arm64 /usr/bin/bazel \
&& chmod +x /usr/bin/bazel

# Add conda to path
ENV PATH="/root/miniconda3/bin:${PATH}"
RUN wget https://github.com/bazelbuild/bazelisk/releases/download/v1.19.0/bazelisk-linux-arm64 \
&& mv bazelisk-linux-arm64 /usr/bin/bazel \
&& chmod +x /usr/bin/bazel

# run as root for now
WORKDIR /home/admin/
Expand Down
19 changes: 8 additions & 11 deletions dockerfiles/release-ci.DockerFile
Original file line number Diff line number Diff line change
Expand Up @@ -4,31 +4,31 @@ RUN yum install -y centos-release-scl epel-release \
&& yum update -y \
&& yum clean all

# install devtools and [enable it](https://access.redhat.com/solutions/527703)
RUN yum install -y \
git vim-common wget unzip which java-11-openjdk-devel.x86_64 \
git vim-common wget unzip which java-11-openjdk-devel \
libtool autoconf make ninja-build \
&& yum clean all

# install conda
RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh \
&& bash Miniconda3-latest-Linux-x86_64.sh -b \
&& rm -f Miniconda3-latest-Linux-x86_64.sh \
&& /root/miniconda3/bin/conda init bash
&& /root/miniconda3/bin/conda init

# Add conda to path
ENV PATH="/root/miniconda3/bin:${PATH}"

# Install lld
RUN /root/miniconda3/bin/conda install -c conda-forge lld nasm cmake gxx==11.4.0 -y
RUN /root/miniconda3/bin/conda install -c conda-forge lld nasm cmake gxx==11.4.0 -y \
&& /root/miniconda3/bin/conda clean -afy

# install Rust
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y

# install go
ARG GO_VERSION=1.21.4
ARG GO_SHA256SUM="73cac0215254d0c7d1241fa40837851f3b9a8a742d0b54714cbdfb3feaf8f0af"

# install go
RUN set -eux; \
url="https://golang.google.cn/dl/go${GO_VERSION}.linux-amd64.tar.gz"; \
RUN url="https://golang.google.cn/dl/go${GO_VERSION}.linux-amd64.tar.gz"; \
wget --no-check-certificate -O go.tgz "$url"; \
echo "${GO_SHA256SUM} *go.tgz" | sha256sum -c -; \
tar -C /usr/local -xzf go.tgz; \
Expand All @@ -42,9 +42,6 @@ RUN wget https://github.com/bazelbuild/bazelisk/releases/download/v1.19.0/bazeli
&& mv bazelisk-linux-amd64 /usr/bin/bazel \
&& chmod +x /usr/bin/bazel

# Add conda to path
ENV PATH="/root/miniconda3/bin:${PATH}"

# run as root for now
WORKDIR /home/admin/

Expand Down

0 comments on commit b038fce

Please sign in to comment.