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

Add Docker image for ppc64le and CUDA #113

Merged
merged 8 commits into from
May 27, 2020
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
24 changes: 24 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,30 @@ matrix:
- DOCKERIMAGE=miniforge3
- DOCKERTAG=latest

- os: linux
env:
- DOCKERIMAGE=linux-anvil-ppc64le-cuda
- DOCKERTAG=9.2
- CUDA_VER=9.2

- os: linux
env:
- DOCKERIMAGE=linux-anvil-ppc64le-cuda
- DOCKERTAG=10.0
- CUDA_VER=10.0

- os: linux
env:
- DOCKERIMAGE=linux-anvil-ppc64le-cuda
- DOCKERTAG=10.1
- CUDA_VER=10.1

- os: linux
env:
- DOCKERIMAGE=linux-anvil-ppc64le-cuda
- DOCKERTAG=10.2
- CUDA_VER=10.2

env:
global:
secure: "nM8OaFilQkH14wzD1S6DTGejjo3yL/q/1dpz7144Kw68s8FVqW0zsxCC6960ieokY2LutGSv16qTiIFxnRZnHPCXt7X2MhxcagX8IcMu62DWe2jgqwho0hPI65N/bQYLW1l23e9tjKQxWFZopM4Oyzm6TBqlzibTdbPuQI+YB3RBY0dlkIlupPIYtiNlLRR/HnOyyUny/hg3Z65GWeVpXhiMPqXLlfliTiQ31JgBaNuXiP3/ruSCDeyRPWx62IcPGJ1xVSXL3tvkEI2TpGVCsraKCSbgINhm3AHjQ+8ST6GPMxaOaHrKZzssKJpsZhz1dzWINXTLOQ5LrKtBVwfaevFxDmPEr9RcVlzwAAyuWugCyV4Z6NSt/j2Qqw5qGaiiDHyBH0FMmBgzlPzLZ4JKFsZ68aRkc2qV0MeN0YJRwcQ0EnXRULrcwReBztDHZwixSxqlPpQUwbRr7ne05rBjVoMTKaEhyHPO+KYSwQB1wiQgILBtlP/5ofsYc9Eb46m5JJJhJxuLythKpW9mMqd/US4rQrgEHQ/QRIRYwzGnKf/5WXV3W2o4C9QZpH5Da3J7jOLlqxIY5I+Dv9eEk7XxhT7UaEo7C9tmzjaL2D0yrzPnOnPQhMpmCVNWqdTp1eLcIASKSPbmzz8MuYB5yg48wjXWvDIRBQ6hJyuKHhNGE9k="
Expand Down
80 changes: 80 additions & 0 deletions linux-anvil-ppc64le-cuda/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
# Note that this image doesn't cache cudatoolkit as it is not packaged by defaults.
# This docker image is meant for packages using CUDA driver and not for packages
# using the CUDA runtime.
Copy link
Member Author

Choose a reason for hiding this comment

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

Have also raised issue ( #141 ) about this so we can track this need/redirect people there.


ARG CUDA_VER

FROM nvidia/cuda-ppc64le:${CUDA_VER}-devel-centos7

LABEL maintainer="conda-forge <conda-forge@googlegroups.com>"

# Set CUDA_VER during runtime.
ARG CUDA_VER
ENV CUDA_VER ${CUDA_VER}

# Add qemu in here so that we can use this image on regular linux hosts with qemu user installed
ADD qemu-ppc64le-static /usr/bin/qemu-ppc64le-static

# Set an encoding to make things work smoothly.
ENV LANG en_US.UTF-8
ENV LANGUAGE=en_US.UTF-8

# Set path to CUDA install.
ENV CUDA_HOME /usr/local/cuda

# Add a timestamp for the build. Also, bust the cache.
ADD http://worldclockapi.com/api/json/utc/now /opt/docker/etc/timestamp

# Resolves a nasty NOKEY warning that appears when using yum.
RUN rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7 && \
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-AltArch-7-ppc64le

# Remove preinclude system compilers
RUN rpm -e --nodeps --verbose gcc gcc-c++

# Install basic requirements.
COPY scripts/yum_clean_all /opt/docker/bin/
RUN yum update -y && \
yum install -y \
bzip2 \
sudo \
tar \
which && \
/opt/docker/bin/yum_clean_all

# Run common commands
COPY scripts/run_commands /opt/docker/bin/run_commands
RUN /opt/docker/bin/run_commands

# Download and cache new compiler packages.
# Should speedup installation of them on CIs.
RUN source /opt/conda/etc/profile.d/conda.sh && \
conda activate && \
conda create -n test --yes --quiet --download-only \
conda-forge::binutils_impl_linux-ppc64le \
conda-forge::binutils_linux-ppc64le \
conda-forge::gcc_impl_linux-ppc64le \
conda-forge::gcc_linux-ppc64le \
conda-forge::gfortran_impl_linux-ppc64le \
conda-forge::gfortran_linux-ppc64le \
conda-forge::gxx_impl_linux-ppc64le \
conda-forge::gxx_linux-ppc64le \
conda-forge::libgcc-ng \
conda-forge::libgfortran-ng \
conda-forge::libstdcxx-ng && \
conda remove --yes --quiet -n test --all && \
conda clean -tiy && \
chgrp -R lucky /opt/conda && \
chmod -R g=u /opt/conda

# 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`.
COPY linux-anvil-ppc64le/entrypoint_source /opt/docker/bin/entrypoint_source
COPY scripts/entrypoint /opt/docker/bin/entrypoint

# Ensure that all containers start with tini and the user selected process.
# Activate the `conda` environment `root`.
# Provide a default command (`bash`), which will start if the user doesn't specify one.
ENTRYPOINT [ "/opt/conda/bin/tini", "--", "/opt/docker/bin/entrypoint" ]
CMD [ "/bin/bash" ]
2 changes: 2 additions & 0 deletions linux-anvil-ppc64le-cuda/entrypoint_source
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Activate the `base` conda environment.
conda activate base