Skip to content

Commit f22de69

Browse files
build script comment manylinux check
1 parent 7f9bb2a commit f22de69

File tree

1 file changed

+59
-57
lines changed

1 file changed

+59
-57
lines changed
Lines changed: 59 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -1,88 +1,90 @@
1-
# Self-Hosted IBM Z Github Actions Runner.
2-
3-
# Temporary image: amd64 dependencies.
1+
# Stage 1: Temporary image for amd64 dependencies
42
FROM docker.io/amd64/ubuntu:22.04 as ld-prefix
53
ENV DEBIAN_FRONTEND=noninteractive
6-
RUN apt-get update && apt-get -y install ca-certificates libicu70 libssl3
4+
RUN apt-get update && apt-get -y install \
5+
ca-certificates \
6+
libicu70 \
7+
libssl3
78

8-
# Main image.
9+
# Main image: ppc64le Ubuntu
910
FROM --platform=linux/ppc64le ubuntu:22.04
1011

11-
# Packages for pytorch building and testing.
12+
# Set non-interactive mode for apt
1213
ENV DEBIAN_FRONTEND=noninteractive
13-
RUN apt-get update && apt-get -y install \
14-
cmake \
15-
curl \
16-
gcc \
17-
git \
18-
jq \
19-
zip \
20-
libxml2-dev \
21-
libxslt-dev \
22-
ninja-build \
23-
python-is-python3 \
24-
python3 \
25-
python3-dev \
26-
python3-pip \
27-
pybind11-dev \
28-
python3-numpy \
29-
libopenblas-dev \
30-
liblapack-dev \
31-
libgloo-dev \
32-
python3-yaml \
33-
python3-scipy \
34-
virtualenv
3514

36-
# amd64 dependencies.
15+
# Install dependencies for building and testing PyTorch
16+
RUN apt-get update && apt-get -y install --no-install-recommends \
17+
build-essential \
18+
cmake \
19+
curl \
20+
gcc \
21+
git \
22+
jq \
23+
zip \
24+
libxml2-dev \
25+
libxslt-dev \
26+
ninja-build \
27+
python-is-python3 \
28+
python3 \
29+
python3-dev \
30+
python3-pip \
31+
pybind11-dev \
32+
python3-numpy \
33+
libopenblas-dev \
34+
liblapack-dev \
35+
libgloo-dev \
36+
python3-yaml \
37+
python3-scipy \
38+
virtualenv \
39+
wget \
40+
ca-certificates \
41+
&& apt-get clean && rm -rf /var/lib/apt/lists/*
42+
43+
# Copy amd64 dependencies from the ld-prefix stage
3744
COPY --from=ld-prefix / /usr/x86_64-linux-gnu/
3845
RUN ln -fs ../lib/x86_64-linux-gnu/ld-linux-x86-64.so.2 /usr/x86_64-linux-gnu/lib64/
3946
RUN ln -fs /etc/resolv.conf /usr/x86_64-linux-gnu/etc/
4047
ENV QEMU_LD_PREFIX=/usr/x86_64-linux-gnu
4148

42-
# Scripts.
49+
# Copy custom scripts
4350
COPY fs/ /
44-
4551
RUN chmod +x /usr/bin/actions-runner /usr/bin/entrypoint
4652

47-
48-
RUN curl -LO https://golang.org/dl/go1.21.1.linux-ppc64le.tar.gz && \
49-
tar -C /usr/local -xzf go1.21.1.linux-ppc64le.tar.gz && \
50-
export PATH=$PATH:/usr/local/go/bin &&\
51-
go version
52-
53-
# install podman
54-
# Add Podman repository and install Podman
55-
56-
# Clone and build Podman
53+
# Install Go (v1.21.1) for ppc64le
54+
RUN curl -LO https://golang.org/dl/go1.21.1.linux-ppc64le.tar.gz && \
55+
tar -C /usr/local -xzf go1.21.1.linux-ppc64le.tar.gz && \
56+
rm go1.21.1.linux-ppc64le.tar.gz
57+
ENV PATH=$PATH:/usr/local/go/bin
58+
RUN go version
59+
60+
# Install Podman (v4.6.0) for container management
61+
RUN apt-get update && apt-get install -y \
62+
make \
63+
gcc \
64+
libseccomp-dev \
65+
libapparmor-dev \
66+
&& apt-get clean && rm -rf /var/lib/apt/lists/*
5767
RUN git clone https://github.com/containers/podman.git && \
5868
cd podman && \
59-
git checkout v4.6.0 && \
69+
git checkout v4.6.0 && \
6070
make BUILDTAGS="seccomp apparmor" && \
61-
make install
62-
63-
64-
65-
71+
make install && \
72+
cd .. && rm -rf podman
6673

67-
# amd64 Github Actions Runner.
74+
# Configure GitHub Actions Runner for amd64
6875
RUN useradd -m actions-runner
6976
USER actions-runner
7077
WORKDIR /home/actions-runner
7178

72-
# set up python virtual environment which is later used by runner.
73-
# build workflows use "python -m pip install ...",
74-
# and it doesn't work for non-root user
79+
# Set up Python virtual environment
7580
RUN virtualenv --system-site-packages venv
7681

77-
# copy prebuilt manywheel docker image for builds and tests
78-
# build command is:
79-
# GPU_ARCH_TYPE=cpu-s390x "$(pwd)/manywheel/build_docker.sh"
80-
# and save command is:
81-
# docker image save -o manywheel-s390x.tar pytorch/manylinuxs390x-builder:cpu-s390x
82-
#
82+
# Copy prebuilt manywheel docker image for builds and tests
8383
COPY --chown=actions-runner:actions-runner manywheel-ppc64le.tar /home/actions-runner/manywheel-ppc64le.tar
8484

85+
# Download and extract GitHub Actions Runner
8586
RUN curl -L https://github.com/actions/runner/releases/download/v2.317.0/actions-runner-linux-x64-2.317.0.tar.gz | tar -xz
8687

88+
# Entry point and default command
8789
ENTRYPOINT ["/usr/bin/entrypoint"]
8890
CMD ["/usr/bin/actions-runner"]

0 commit comments

Comments
 (0)