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

WIP: Add CUDA and cuDNN #21

Closed
wants to merge 2 commits into from
Closed
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
1 change: 1 addition & 0 deletions circle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ dependencies:
test:
override:
- docker build -t condaforge/linux-anvil linux-anvil
- docker build -t condaforge/linux-anvil-cudnn linux-anvil-cudnn
79 changes: 79 additions & 0 deletions linux-anvil-cudnn/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
FROM nvidia/cuda:7.5-cudnn5-devel-centos6

MAINTAINER conda-forge <[email protected]>


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

# Add a timestamp for the build. Also, bust the cache.
ADD http://www.timeapi.org/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-6

# Install basic requirements.
RUN yum update -y && \
yum install -y \
bzip2 \
gcc-c++ \
make \
patch \
tar \
which \
libXext-devel \
libXrender-devel \
libSM-devel \
libX11-devel \
mesa-libGL-devel && \
yum clean all

# Install devtoolset 2.
RUN yum update -y && \
yum install -y \
centos-release-scl \
yum-utils && \
yum-config-manager --add-repo http://people.centos.org/tru/devtools-2/devtools-2.repo && \
yum update -y && \
yum install -y \
devtoolset-2-binutils \
devtoolset-2-gcc \
devtoolset-2-gcc-c++ && \
yum clean all

# Download and install tini for zombie reaping.
RUN curl -s -L -O https://github.com/krallin/tini/releases/download/v0.9.0/tini && \
openssl md5 tini | grep 596b898785d2f169ec969445087c14d6 && \
chmod +x tini && \
mv tini /usr/local/bin

# Install the latest Miniconda with Python 3 and update everything.
RUN curl -s -L -O https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh && \
bash Miniconda3-latest-Linux-x86_64.sh -b -p /opt/conda && rm Miniconda*.sh && \
export PATH=/opt/conda/bin:$PATH && \
conda config --set show_channel_urls True && \
conda update --all --yes && \
conda clean -tipy

# Install Obvious-CI.
RUN export PATH="/opt/conda/bin:${PATH}" && \
conda install --yes -c pelson/channel/development obvious-ci && \
obvci_install_conda_build_tools.py && \
conda clean -tipsy

# Install conda-forge git.
RUN export PATH="/opt/conda/bin:${PATH}" && \
conda install --yes -c conda-forge git && \
conda clean -tipsy

# udunits2.
# libtool texinfo
# RUN yum install -y expat-devel

COPY entrypoint_source /opt/docker/bin/entrypoint_source
COPY entrypoint /opt/docker/bin/entrypoint

# Ensure that all containers start with tini and the user selected process.
# Provide a default command (`bash`), which will start if the user doesn't specify one.
ENTRYPOINT [ "/usr/local/bin/tini", "--", "/opt/docker/bin/entrypoint" ]
CMD [ "/bin/bash" ]
7 changes: 7 additions & 0 deletions linux-anvil-cudnn/entrypoint
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash

# Source everything that needs to be.
. /opt/docker/bin/entrypoint_source

# Run whatever the user wants.
exec "$@"
11 changes: 11 additions & 0 deletions linux-anvil-cudnn/entrypoint_source
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Enable the compiler toolset.
#
# Must do this before activating conda or
# the system Python interpreter is not used.
# This is a problem for many reasons. One being
# that the Python scripts used to activate the
# toolset are not Python 3 compatible.
. scl_source enable devtoolset-2

# Activate the `root` conda environment.
. /opt/conda/bin/activate root