Skip to content

Commit 1a553c0

Browse files
changed location of dockerfile
1 parent 99bb624 commit 1a553c0

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# Use UBI 9.3 as base image
2+
FROM registry.access.redhat.com/ubi9/ubi:9.3
3+
4+
# Install necessary dependencies
5+
RUN dnf install -y \
6+
https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm && \
7+
dnf install -y git cmake ninja-build gcc-toolset-13 rust cargo zip \
8+
python3 python3-devel && \
9+
dnf clean all
10+
11+
ENV PATH="/opt/rh/gcc-toolset-13/root/usr/bin:$PATH"
12+
ENV MANPATH="/opt/rh/gcc-toolset-13/root/usr/share/man"
13+
ENV INFOPATH="/opt/rh/gcc-toolset-13/root/usr/share/info"
14+
ENV PCP_DIR="/opt/rh/gcc-toolset-13/root"
15+
ENV LD_LIBRARY_PATH="/opt/rh/gcc-toolset-13/root/usr/lib64:/opt/rh/gcc-toolset-13/root/usr/lib"
16+
17+
# Set Python and pip aliases to use Python 3.9
18+
RUN ln -sf /usr/bin/python3 /usr/bin/python && \
19+
ln -sf /usr/bin/pip3 /usr/bin/pip
20+
21+
COPY requirements.txt .
22+
# Install Python packages via pip
23+
RUN pip install wheel setuptools pyyaml typing_extensions expecttest
24+
25+
#RUN source /opt/rh/gcc-toolset-13/enable && pip install -r requirements.txt
26+
RUN pip install -r requirements.txt
27+
28+
# Copy the PyTorch source code into the container
29+
COPY . /workspace/pytorch
30+
31+
WORKDIR /workspace/pytorch
32+
33+
# Ensure submodules are initialized and updated
34+
RUN git submodule update --init --recursive
35+
36+
# Copy the build script and make it executable
37+
COPY .github/scripts/ppc64le-build.sh /ppc64le-build.sh
38+
RUN chmod +x /ppc64le-build.sh
39+
40+
# Verify permissions and ensure Unix line endings
41+
RUN dos2unix /ppc64le-build.sh || sed -i 's/\r$//' /ppc64le-build.sh
42+
RUN chmod +x /ppc64le-build.sh
43+
44+

0 commit comments

Comments
 (0)