Skip to content

Commit 8ab0810

Browse files
update v1 branch
1 parent 40c5e95 commit 8ab0810

File tree

3 files changed

+57
-235
lines changed

3 files changed

+57
-235
lines changed

.ci/docker/manywheel/Dockerfile_ppc64le

Lines changed: 31 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ ENV LC_ALL=C.UTF-8
66
ENV LANG=C.UTF-8
77
ENV LANGUAGE=C.UTF-8
88

9-
ARG DEVTOOLSET_VERSION=13
9+
ARG DEVTOOLSET_VERSION=14
1010

1111
# Create symbolic links for Python 3.12
12-
RUN ln -sf /opt/python/cp312-cp312/bin/python3.12 /usr/bin/python3 && \
13-
ln -sf /opt/python/cp312-cp312/bin/python3.12 /usr/bin/python
12+
#RUN ln -sf /opt/python/cp312-cp312/bin/python3.12 /usr/bin/python3 && \
13+
# ln -sf /opt/python/cp312-cp312/bin/python3.12 /usr/bin/python
1414

1515
# Install required system dependencies
1616
RUN yum -y install epel-release && \
@@ -67,7 +67,7 @@ RUN yum -y install epel-release && \
6767

6868

6969
# Ensure the correct Python version is used
70-
ENV PATH=/opt/python/cp312-cp312/bin:$PATH
70+
#ENV PATH=/opt/python/cp312-cp312/bin:$PATH
7171
# Add gcc-toolset to the path
7272
ENV PATH=/opt/rh/gcc-toolset-${DEVTOOLSET_VERSION}/root/usr/bin:$PATH
7373
ENV LD_LIBRARY_PATH=/opt/rh/gcc-toolset-${DEVTOOLSET_VERSION}/root/usr/lib64:/opt/rh/gcc-toolset-${DEVTOOLSET_VERSION}/root/usr/lib:$LD_LIBRARY_PATH
@@ -78,24 +78,36 @@ RUN git config --global --add safe.directory "*"
7878
# installed python doesn't have development parts. Rebuild it from scratch
7979
RUN /bin/rm -rf /opt/_internal /opt/python /usr/local/*/*
8080

81-
RUN alternatives --set python /usr/bin/python3.12
82-
RUN alternatives --set python3 /usr/bin/python3.12
83-
84-
RUN pip-3.12 install typing_extensions
85-
8681
# EPEL for cmake
8782
FROM base as patchelf
83+
84+
# Instead of ADD ./common/install_cpython.sh ...
85+
RUN git clone --depth 1 --branch temp-gha-runner-v2 https://github.com/sandeepgupta12/pytorch.git /tmp/pytorch && \
86+
cp /tmp/pytorch/.ci/docker/common/install_patchelf.sh /build_scripts/install_patchelf.sh
8887
# Install patchelf
89-
ADD ./common/install_patchelf.sh install_patchelf.sh
90-
RUN bash ./install_patchelf.sh && rm install_patchelf.sh
88+
# ADD ./common/install_patchelf.sh install_patchelf.sh
89+
#RUN bash ./install_patchelf.sh && rm install_patchelf.sh
90+
#ENV CPYTHON_VERSIONS="3.10.1"
91+
#RUN echo "CPYTHON_VERSIONS=$CPYTHON_VERSIONS" && bash -x /build_scripts/install_cpython.sh
92+
#ENV SSL_CERT_FILE=""
93+
#RUN curl -fL https://bootstrap.pypa.io/get-pip.py -o /tmp/get-pip.py
94+
RUN bash /build_scripts/install_patchelf.sh && rm -r /build_scripts
9195
RUN cp $(which patchelf) /patchelf
9296

9397
FROM patchelf as python
98+
99+
# Clone only required scripts from the PyTorch repo
100+
RUN mkdir -p /build_scripts && \
101+
cp -r /tmp/pytorch/.ci/docker/manywheel/build_scripts/* /build_scripts/ && \
102+
cp /tmp/pytorch/.ci/docker/common/install_cpython.sh /build_scripts/install_cpython.sh && \
103+
rm -rf /tmp/pytorch
94104
# build python
95-
COPY manywheel/build_scripts /build_scripts
96-
ADD ./common/install_cpython.sh /build_scripts/install_cpython.sh
105+
#COPY manywheel/build_scripts /build_scripts
106+
#ADD ./common/install_cpython.sh /build_scripts/install_cpython.sh
97107
ENV SSL_CERT_FILE=
98-
RUN bash build_scripts/build.sh && rm -r build_scripts
108+
# Run the build script
109+
RUN bash /build_scripts/build.sh && rm -r /build_scripts
110+
#RUN bash build_scripts/build.sh && rm -r build_scripts
99111
#RUN bash build_scripts/build.sh || (echo "Checksum verification failed!" && exit 1)
100112

101113
FROM base as final
@@ -104,6 +116,11 @@ COPY --from=python /opt/_internal /opt/_inter
104116
COPY --from=python /opt/python/cp39-cp39/bin/auditwheel /usr/local/bin/auditwheel
105117
COPY --from=patchelf /usr/local/bin/patchelf /usr/local/bin/patchelf
106118

119+
RUN alternatives --set python /usr/bin/python3.12
120+
RUN alternatives --set python3 /usr/bin/python3.12
121+
122+
RUN pip-3.12 install typing_extensions
123+
107124
# Install required Python packages
108125
#RUN pip install --upgrade pip
109126
#RUN pip install typing_extensions pyyaml setuptools

.github/workflows/generated-linux-ppc64le-binary-manywheel-nightly.yml

Lines changed: 4 additions & 199 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/workflows/ppc64le.yml

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -11,38 +11,38 @@ concurrency:
1111
cancel-in-progress: true
1212

1313
jobs:
14-
linux-ppc64le-docker-image-build:
15-
name: Build docker image for ppc64le
16-
runs-on: ubuntu-24.04-ppc64le
17-
steps:
18-
- name: Checkout PyTorch
19-
uses: pytorch/pytorch/.github/actions/checkout-pytorch@main
20-
with:
21-
submodules: false
22-
no-sudo: true
14+
# linux-ppc64le-docker-image-build:
15+
# name: Build docker image for ppc64le
16+
# runs-on: ubuntu-24.04-ppc64le
17+
# steps:
18+
# - name: Checkout PyTorch
19+
# uses: pytorch/pytorch/.github/actions/checkout-pytorch@main
20+
# with:
21+
# submodules: false
22+
# no-sudo: true
2323

2424

2525

26-
- name: Build Docker image for ppc64le
27-
run: |
28-
# docker build -f .ci/docker/manywheel/Dockerfile_ppc64le -t manylinuxppc64le-builder .
29-
.ci/docker/manywheel/build.sh manylinuxppc64le-builder:cpu-ppc64le -t manylinuxppc64le-builder
26+
# - name: Build Docker image for ppc64le
27+
# run: |
28+
# # docker build -f .ci/docker/manywheel/Dockerfile_ppc64le -t manylinuxppc64le-builder .
29+
# .ci/docker/manywheel/build.sh manylinuxppc64le-builder:cpu-ppc64le -t manylinuxppc64le-builder
3030

31-
- name: Save Docker image to tarball
32-
run: |
33-
docker save manylinuxppc64le-builder -o manylinuxppc64le-builder.tar
31+
# - name: Save Docker image to tarball
32+
# run: |
33+
# docker save manylinuxppc64le-builder -o manylinuxppc64le-builder.tar
3434

35-
- name: Upload image artifact
36-
uses: actions/upload-artifact@v4
37-
with:
38-
name: manylinuxppc64le-builder-image
39-
path: manylinuxppc64le-builder.tar
35+
# - name: Upload image artifact
36+
# uses: actions/upload-artifact@v4
37+
# with:
38+
# name: manylinuxppc64le-builder-image
39+
# path: manylinuxppc64le-builder.tar
4040

4141
linux-manylinux-2_28-py3-cpu-ppc64le-build:
4242

4343
name: linux-manylinux-2_28-py3-cpu-ppc64le-build
4444
uses: ./.github/workflows/_linux-build.yml
45-
needs: linux-ppc64le-docker-image-build
45+
#needs: linux-ppc64le-docker-image-build
4646
with:
4747
build-environment: linux-ppc64le-binary-manywheel
4848
docker-image-name: manylinuxppc64le-builder

0 commit comments

Comments
 (0)