@@ -69,70 +69,70 @@ RUN yum -y install epel-release && \
6969# Ensure the correct Python version is used
7070#ENV PATH=/opt/python/cp312-cp312/bin:$PATH
7171# Add gcc-toolset to the path
72- ENV PATH=/opt/rh/gcc-toolset-${DEVTOOLSET_VERSION}/root/usr/bin:$PATH
73- 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
72+ # ENV PATH=/opt/rh/gcc-toolset-${DEVTOOLSET_VERSION}/root/usr/bin:$PATH
73+ # 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
7474
7575# Configure git to avoid safe directory issues
76- RUN git config --global --add safe.directory "*"
76+ # RUN git config --global --add safe.directory "*"
7777
7878# installed python doesn't have development parts. Rebuild it from scratch
79- RUN /bin/rm -rf /opt/_internal /opt/python /usr/local/*/*
79+ # RUN /bin/rm -rf /opt/_internal /opt/python /usr/local/*/*
8080
8181# EPEL for cmake
82- 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
87- # Install patchelf
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
95- RUN cp $(which patchelf) /patchelf
96-
97- 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
104- # build python
105- #COPY manywheel/build_scripts /build_scripts
106- #ADD ./common/install_cpython.sh /build_scripts/install_cpython.sh
107- ENV SSL_CERT_FILE=
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
111- #RUN bash build_scripts/build.sh || (echo "Checksum verification failed!" && exit 1)
112-
113- FROM base as final
114- COPY --from=python /opt/python /opt/python
115- COPY --from=python /opt/_internal /opt/_internal
116- COPY --from=python /opt/python/cp39-cp39/bin/auditwheel /usr/local/bin/auditwheel
117- COPY --from=patchelf /usr/local/bin/patchelf /usr/local/bin/patchelf
118-
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-
124- # Install required Python packages
125- #RUN pip install --upgrade pip
126- #RUN pip install typing_extensions pyyaml setuptools
82+ # 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
87+ # # Install patchelf
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
95+ # RUN cp $(which patchelf) /patchelf
96+
97+ # 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
104+ # # build python
105+ # # COPY manywheel/build_scripts /build_scripts
106+ # # ADD ./common/install_cpython.sh /build_scripts/install_cpython.sh
107+ # ENV SSL_CERT_FILE=
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
111+ # # RUN bash build_scripts/build.sh || (echo "Checksum verification failed!" && exit 1)
112+
113+ # FROM base as final
114+ # COPY --from=python /opt/python /opt/python
115+ # COPY --from=python /opt/_internal /opt/_internal
116+ # COPY --from=python /opt/python/cp39-cp39/bin/auditwheel /usr/local/bin/auditwheel
117+ # COPY --from=patchelf /usr/local/bin/patchelf /usr/local/bin/patchelf
118+
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+
124+ # # Install required Python packages
125+ # # RUN pip install --upgrade pip
126+ # # RUN pip install typing_extensions pyyaml setuptools
127127
128- # Install test dependencies
129- RUN dnf install -y \
130- protobuf-devel \
131- protobuf-c-devel \
132- protobuf-lite-devel \
133- wget \
134- patch
135-
136- # Set default entrypoint
137- ENTRYPOINT []
138- CMD ["/bin/bash"]
128+ # # Install test dependencies
129+ # RUN dnf install -y \
130+ # protobuf-devel \
131+ # protobuf-c-devel \
132+ # protobuf-lite-devel \
133+ # wget \
134+ # patch
135+
136+ # # Set default entrypoint
137+ # ENTRYPOINT []
138+ # CMD ["/bin/bash"]
0 commit comments