Skip to content

Commit 5b1eb35

Browse files
committed
arch64: CD: add manylinux_2_28 docker build workflow
1 parent e7948ec commit 5b1eb35

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_cxx11-abi
1718
- manywheel/build_docker.sh
1819
- 'common/*'
@@ -21,6 +22,7 @@ on:
2122
- .github/workflows/build-manywheel-images.yml
2223
- manywheel/Dockerfile
2324
- manywheel/Dockerfile_aarch64
25+
- manywheel/Dockerfile_2_28_aarch64
2426
- manywheel/Dockerfile_cxx11-abi
2527
- 'common/*'
2628
- manywheel/build_docker.sh
@@ -101,6 +103,21 @@ jobs:
101103
- name: Build Docker Image
102104
run: |
103105
manywheel/build_docker.sh
106+
build-docker-cpu-aarch64-2_28:
107+
runs-on: linux.arm64.2xlarge
108+
env:
109+
GPU_ARCH_TYPE: cpu-aarch64-2_28
110+
steps:
111+
- name: Checkout PyTorch
112+
uses: actions/checkout@v3
113+
- name: Authenticate if WITH_PUSH
114+
run: |
115+
if [[ "${WITH_PUSH}" == true ]]; then
116+
echo "${DOCKER_TOKEN}" | docker login -u "${DOCKER_ID}" --password-stdin
117+
fi
118+
- name: Build Docker Image
119+
run: |
120+
manywheel/build_docker.sh
104121
build-docker-cpu-cxx11-abi:
105122
runs-on: ubuntu-22.04
106123
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)