-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* init linux arm image * Update ci image * Fix * make base image multi-arch * Update publish script * Update script * Fix script * Restore push * Update script * Fix * Update base * Use latest tag
- Loading branch information
Showing
4 changed files
with
175 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
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 \ | ||
&& yum install -y dnf-plugins-core \ | ||
&& 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 \ | ||
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 | ||
|
||
# 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 | ||
|
||
# install go | ||
ARG GO_VERSION=1.19.10 | ||
ARG GO_SHA256SUM="df98698821211c819e8b2420c77a0f802d989e377718578a31b1f91f6be2c5b4" | ||
|
||
# install go | ||
RUN set -eux; \ | ||
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; \ | ||
rm go.tgz; | ||
|
||
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 as root for now | ||
WORKDIR /home/admin/ | ||
|
||
ENTRYPOINT [ "/bin/bash", "-l" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,16 @@ | ||
# Base image contains c++ toolchain and python | ||
# These should be consistant across all Secretflow dockers | ||
FROM secretflow/ubuntu-base-ci:0.4 | ||
FROM secretflow/ubuntu-base-ci:latest | ||
|
||
ARG GO_VERSION=1.19.7 | ||
ARG GO_SHA256SUM="7a75720c9b066ae1750f6bcc7052aba70fa3813f4223199ee2a2315fd3eb533d" | ||
ARG TARGETPLATFORM | ||
|
||
ARG GO_VERSION=1.19.10 | ||
|
||
# Required by grpc | ||
# install go | ||
RUN set -eux; \ | ||
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; \ | ||
rm go.tgz; | ||
RUN if [ "$TARGETPLATFORM" = "linux/amd64" ] ; then GO_ARCH=amd64 ; else GO_ARCH=arm64 ; fi \ | ||
&& wget --no-check-certificate -O go.tgz https://golang.google.cn/dl/go${GO_VERSION}.linux-$GO_ARCH.tar.gz \ | ||
&& tar -C /usr/local -xzf go.tgz \ | ||
&& rm go.tgz | ||
|
||
ENV GOPATH="/usr/local" | ||
ENV PATH="/usr/local/go/bin:${GOPATH}/bin:${PATH}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters