Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PPC: add 11.0, 11.1, 11.2 + cached cudatoolkit pkg #178

Merged
merged 6 commits into from
Apr 23, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,21 @@ jobs:
CUDA_VER: "10.2"
CENTOS_VER: "7"

- DOCKERIMAGE: linux-anvil-ppc64le-cuda
DOCKERTAG: "11.0"
CUDA_VER: "11.0"
CENTOS_VER: "8"

- DOCKERIMAGE: linux-anvil-ppc64le-cuda
DOCKERTAG: "11.1"
CUDA_VER: "11.1"
CENTOS_VER: "8"

- DOCKERIMAGE: linux-anvil-ppc64le-cuda
DOCKERTAG: "11.2"
CUDA_VER: "11.2.2"
CENTOS_VER: "8"

env:
DOCKERIMAGE: ${{ matrix.cfg.DOCKERIMAGE }}
DOCKERFILE: ${{ matrix.cfg.DOCKERFILE }}
Expand Down
37 changes: 34 additions & 3 deletions linux-anvil-ppc64le-cuda/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,15 @@ ENV CUDA_HOME /usr/local/cuda
ADD http://www.randomtext.me/api/gibberish /opt/docker/etc/gibberish

# Resolves a nasty NOKEY warning that appears when using yum.
RUN rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-${CENTOS_VER} && \
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-AltArch-${CENTOS_VER}-ppc64le
# Naming convention changed with cos8 - see:
# * https://lists.centos.org/pipermail/centos-devel/2019-September/017847.html
# * https://www.centos.org/keys/#project-keys
RUN if [ "$CENTOS_VER" -le "7" ]; then \
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-${CENTOS_VER} && \
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-AltArch-${CENTOS_VER}-ppc64le; \
else \
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial; \
fi

# Remove preinclude system compilers
RUN rpm -e --nodeps --verbose gcc gcc-c++
Expand All @@ -41,9 +48,18 @@ RUN yum update -y --disablerepo=cuda && \
bzip2 \
sudo \
tar \
which && \
which \
&& \
/opt/docker/bin/yum_clean_all

# Fix locale in CentOS8 images
# See https://github.com/CentOS/sig-cloud-instance-images/issues/154
RUN if [ "$CENTOS_VER" -ge "8" ]; then \
yum install -y glibc-langpack-en \
&& \
/opt/docker/bin/yum_clean_all; \
fi

# Run common commands
COPY scripts/run_commands /opt/docker/bin/run_commands
RUN /opt/docker/bin/run_commands
Expand All @@ -69,6 +85,21 @@ RUN source /opt/conda/etc/profile.d/conda.sh && \
chgrp -R lucky /opt/conda && \
chmod -R g=u /opt/conda

# Download and cache CUDA related packages.
RUN if [[ "$CUDA_VER" == "9.2" || "$CUDA_VER" == "10.0" || "$CUDA_VER" == "10.1" ]]; then \
echo "`cudatoolkit` not available for CUDA_VER<10.2"; \
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a nitpick: maybe we should error out here?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think Isuru wants them around because they are being used somewhere.

else \
source /opt/conda/etc/profile.d/conda.sh && \
conda activate && \
conda create -n test --yes --quiet --download-only \
conda-forge::cudatoolkit=${CUDA_VER} \
&& \
conda remove --yes --quiet -n test --all && \
conda clean -tiy && \
chgrp -R lucky /opt/conda && \
chmod -R g=u /opt/conda; \
fi

# Add a file for users to source to activate the `conda`
# environment `root`. Also add a file that wraps that for
# use with the `ENTRYPOINT`.
Expand Down