Skip to content

Commit f42c902

Browse files
committed
aarch64: CD: add manylinux_2_28 docker build workflow
1 parent 615571c commit f42c902

File tree

3 files changed

+81
-0
lines changed

3 files changed

+81
-0
lines changed

Diff for: .github/workflows/build-manywheel-images.yml

+17
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ on:
1313
- .github/workflows/build-manywheel-images.yml
1414
- manywheel/Dockerfile
1515
- manywheel/Dockerfile_aarch64
16+
- manywheel/Dockerfile_2_28_aarch64
1617
- manywheel/Dockerfile_cuda_aarch64
1718
- manywheel/Dockerfile_cxx11-abi
1819
- manywheel/build_docker.sh
@@ -22,6 +23,7 @@ on:
2223
- .github/workflows/build-manywheel-images.yml
2324
- manywheel/Dockerfile
2425
- manywheel/Dockerfile_aarch64
26+
- manywheel/Dockerfile_2_28_aarch64
2527
- manywheel/Dockerfile_cuda_aarch64
2628
- manywheel/Dockerfile_cxx11-abi
2729
- 'common/*'
@@ -122,6 +124,21 @@ jobs:
122124
- name: Build Docker Image
123125
run: |
124126
manywheel/build_docker.sh
127+
build-docker-cpu-aarch64-2_28:
128+
runs-on: linux.arm64.2xlarge
129+
env:
130+
GPU_ARCH_TYPE: cpu-aarch64-2_28
131+
steps:
132+
- name: Checkout PyTorch
133+
uses: actions/checkout@v3
134+
- name: Authenticate if WITH_PUSH
135+
run: |
136+
if [[ "${WITH_PUSH}" == true ]]; then
137+
echo "${DOCKER_TOKEN}" | docker login -u "${DOCKER_ID}" --password-stdin
138+
fi
139+
- name: Build Docker Image
140+
run: |
141+
manywheel/build_docker.sh
125142
build-docker-cpu-cxx11-abi:
126143
runs-on: ubuntu-22.04
127144
env:

Diff for: manywheel/Dockerfile_2_28_aarch64

+56
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
FROM quay.io/pypa/manylinux_2_28_aarch64 as base
2+
3+
# Graviton needs GCC 10 or above for the build. GCC12 is the default version in almalinux-8.
4+
ARG GCCTOOLSET_VERSION=11
5+
6+
# Language variabes
7+
ENV LC_ALL=en_US.UTF-8
8+
ENV LANG=en_US.UTF-8
9+
ENV LANGUAGE=en_US.UTF-8
10+
11+
# Installed needed OS packages. This is to support all
12+
# the binary builds (torch, vision, audio, text, data)
13+
RUN yum -y install epel-release
14+
RUN yum -y update
15+
RUN yum install -y \
16+
autoconf \
17+
automake \
18+
bison \
19+
bzip2 \
20+
curl \
21+
diffutils \
22+
file \
23+
git \
24+
less \
25+
libffi-devel \
26+
libgomp \
27+
make \
28+
openssl-devel \
29+
patch \
30+
perl \
31+
unzip \
32+
util-linux \
33+
wget \
34+
which \
35+
xz \
36+
yasm \
37+
zstd \
38+
gcc-toolset-${GCCTOOLSET_VERSION}-toolchain
39+
40+
# Ensure the expected devtoolset is used
41+
ENV PATH=/opt/rh/gcc-toolset-${GCCTOOLSET_VERSION}/root/usr/bin:$PATH
42+
ENV LD_LIBRARY_PATH=/opt/rh/gcc-toolset-${GCCTOOLSET_VERSION}/root/usr/lib64:/opt/rh/gcc-toolset-${GCCTOOLSET_VERSION}/root/usr/lib:$LD_LIBRARY_PATH
43+
44+
# git236+ would refuse to run git commands in repos owned by other users
45+
# Which causes version check to fail, as pytorch repo is bind-mounted into the image
46+
# Override this behaviour by treating every folder as safe
47+
# For more details see https://github.com/pytorch/pytorch/issues/78659#issuecomment-1144107327
48+
RUN git config --global --add safe.directory "*"
49+
50+
FROM base as final
51+
52+
# remove unncessary python versions
53+
RUN rm -rf /opt/python/cp26-cp26m /opt/_internal/cpython-2.6.9-ucs2
54+
RUN rm -rf /opt/python/cp26-cp26mu /opt/_internal/cpython-2.6.9-ucs4
55+
RUN rm -rf /opt/python/cp33-cp33m /opt/_internal/cpython-3.3.6
56+
RUN rm -rf /opt/python/cp34-cp34m /opt/_internal/cpython-3.4.6

Diff for: manywheel/build_docker.sh

+8
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,14 @@ case ${GPU_ARCH_TYPE} in
2828
DOCKER_GPU_BUILD_ARG=" --build-arg DEVTOOLSET_VERSION=10"
2929
MANY_LINUX_VERSION="aarch64"
3030
;;
31+
cpu-aarch64-2_28)
32+
TARGET=final
33+
DOCKER_TAG=cpu-aarch64
34+
LEGACY_DOCKER_IMAGE=${DOCKER_REGISTRY}/pytorch/manylinux_2_28-cpu-aarch64
35+
GPU_IMAGE=arm64v8/almalinux:8
36+
DOCKER_GPU_BUILD_ARG=" --build-arg DEVTOOLSET_VERSION=11"
37+
MANY_LINUX_VERSION="2_28_aarch64"
38+
;;
3139
cpu-cxx11-abi)
3240
TARGET=final
3341
DOCKER_TAG=cpu-cxx11-abi

0 commit comments

Comments
 (0)