Skip to content

Commit 129544c

Browse files
authored
arch64: CD: add manylinux_2_28 docker build workflow (#1784)
1 parent bebc062 commit 129544c

File tree

3 files changed

+81
-0
lines changed

3 files changed

+81
-0
lines changed

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

+17
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ on:
1414
- manywheel/Dockerfile
1515
- manywheel/Dockerfile_2_28
1616
- manywheel/Dockerfile_aarch64
17+
- manywheel/Dockerfile_2_28_aarch64
1718
- manywheel/Dockerfile_cuda_aarch64
1819
- manywheel/Dockerfile_cxx11-abi
1920
- manywheel/build_docker.sh
@@ -24,6 +25,7 @@ on:
2425
- manywheel/Dockerfile
2526
- manywheel/Dockerfile_2_28
2627
- manywheel/Dockerfile_aarch64
28+
- manywheel/Dockerfile_2_28_aarch64
2729
- manywheel/Dockerfile_cuda_aarch64
2830
- manywheel/Dockerfile_cxx11-abi
2931
- 'common/*'
@@ -139,6 +141,21 @@ jobs:
139141
- name: Build Docker Image
140142
run: |
141143
manywheel/build_docker.sh
144+
build-docker-cpu-aarch64-2_28:
145+
runs-on: linux.arm64.2xlarge
146+
env:
147+
GPU_ARCH_TYPE: cpu-aarch64-2_28
148+
steps:
149+
- name: Checkout PyTorch
150+
uses: actions/checkout@v3
151+
- name: Authenticate if WITH_PUSH
152+
run: |
153+
if [[ "${WITH_PUSH}" == true ]]; then
154+
echo "${DOCKER_TOKEN}" | docker login -u "${DOCKER_ID}" --password-stdin
155+
fi
156+
- name: Build Docker Image
157+
run: |
158+
manywheel/build_docker.sh
142159
build-docker-cpu-cxx11-abi:
143160
runs-on: ubuntu-22.04
144161
env:

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

manywheel/build_docker.sh

+8
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,14 @@ case ${GPU_ARCH_TYPE} in
3636
DOCKER_GPU_BUILD_ARG=" --build-arg DEVTOOLSET_VERSION=10"
3737
MANY_LINUX_VERSION="aarch64"
3838
;;
39+
cpu-aarch64-2_28)
40+
TARGET=final
41+
DOCKER_TAG=cpu-aarch64
42+
LEGACY_DOCKER_IMAGE=${DOCKER_REGISTRY}/pytorch/manylinux_2_28-cpu-aarch64
43+
GPU_IMAGE=arm64v8/almalinux:8
44+
DOCKER_GPU_BUILD_ARG=" --build-arg DEVTOOLSET_VERSION=11"
45+
MANY_LINUX_VERSION="2_28_aarch64"
46+
;;
3947
cpu-cxx11-abi)
4048
TARGET=final
4149
DOCKER_TAG=cpu-cxx11-abi

0 commit comments

Comments
 (0)