This repository has been archived by the owner on Nov 14, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
✨ Add image tag with CUDA devel (e.g. for dlib) (#3)
- Loading branch information
Showing
4 changed files
with
147 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,135 @@ | ||
FROM nvidia/cuda:9.1-devel | ||
|
||
LABEL maintainer="Sebastian Ramirez <[email protected]>" | ||
|
||
# Install buildpack-deps:latest with its base image parts, as it is the base for official Python | ||
|
||
# buildpack-deps:curl https://github.com/docker-library/buildpack-deps/blob/master/stretch/curl/Dockerfile | ||
RUN apt-get update && apt-get install -y --no-install-recommends \ | ||
ca-certificates \ | ||
curl \ | ||
netbase \ | ||
wget \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
RUN set -ex; \ | ||
if ! command -v gpg > /dev/null; then \ | ||
apt-get update; \ | ||
apt-get install -y --no-install-recommends \ | ||
gnupg \ | ||
dirmngr \ | ||
; \ | ||
rm -rf /var/lib/apt/lists/*; \ | ||
fi | ||
# End buildpack-deps:curl | ||
|
||
# buildpack-deps:scm https://github.com/docker-library/buildpack-deps/blob/master/stretch/scm/Dockerfile | ||
|
||
# procps is very common in build systems, and is a reasonably small package | ||
RUN apt-get update && apt-get install -y --no-install-recommends \ | ||
bzr \ | ||
git \ | ||
mercurial \ | ||
openssh-client \ | ||
subversion \ | ||
\ | ||
procps \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
# End buildpack-deps:scm | ||
|
||
# buildpack-deps:latest https://github.com/docker-library/buildpack-deps/blob/master/stretch/Dockerfile | ||
|
||
RUN set -ex; \ | ||
apt-get update; \ | ||
apt-get install -y --no-install-recommends \ | ||
autoconf \ | ||
automake \ | ||
bzip2 \ | ||
dpkg-dev \ | ||
file \ | ||
g++ \ | ||
gcc \ | ||
imagemagick \ | ||
libbz2-dev \ | ||
libc6-dev \ | ||
libcurl4-openssl-dev \ | ||
libdb-dev \ | ||
libevent-dev \ | ||
libffi-dev \ | ||
libgdbm-dev \ | ||
libgeoip-dev \ | ||
libglib2.0-dev \ | ||
libgmp-dev \ | ||
libjpeg-dev \ | ||
libkrb5-dev \ | ||
liblzma-dev \ | ||
libmagickcore-dev \ | ||
libmagickwand-dev \ | ||
libncurses5-dev \ | ||
libncursesw5-dev \ | ||
libpng-dev \ | ||
libpq-dev \ | ||
libreadline-dev \ | ||
libsqlite3-dev \ | ||
libssl-dev \ | ||
libtool \ | ||
libwebp-dev \ | ||
libxml2-dev \ | ||
libxslt-dev \ | ||
libyaml-dev \ | ||
make \ | ||
patch \ | ||
unzip \ | ||
xz-utils \ | ||
zlib1g-dev \ | ||
\ | ||
# https://lists.debian.org/debian-devel-announce/2016/09/msg00000.html | ||
$( \ | ||
# if we use just "apt-cache show" here, it returns zero because "Can't select versions from package 'libmysqlclient-dev' as it is purely virtual", hence the pipe to grep | ||
if apt-cache show 'default-libmysqlclient-dev' 2>/dev/null | grep -q '^Version:'; then \ | ||
echo 'default-libmysqlclient-dev'; \ | ||
else \ | ||
echo 'libmysqlclient-dev'; \ | ||
fi \ | ||
) \ | ||
; \ | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
# End buildpack-deps:latest | ||
|
||
ENV PYTHON_VERSION=3.6 | ||
|
||
# Conda, fragments from: https://github.com/ContinuumIO/docker-images/blob/master/miniconda3/Dockerfile | ||
# Explicit install of Python 3.7 with: | ||
# /opt/conda/bin/conda install -y python=$PYTHON_VERSION && \ | ||
ENV LANG=C.UTF-8 LC_ALL=C.UTF-8 | ||
ENV PATH /opt/conda/bin:$PATH | ||
|
||
RUN apt-get update --fix-missing && \ | ||
apt-get install -y wget bzip2 ca-certificates curl git && \ | ||
apt-get clean && \ | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
RUN wget --quiet https://repo.anaconda.com/miniconda/Miniconda3-4.5.12-Linux-x86_64.sh -O ~/miniconda.sh && \ | ||
/bin/bash ~/miniconda.sh -b -p /opt/conda && \ | ||
rm ~/miniconda.sh && \ | ||
/opt/conda/bin/conda install -y python=$PYTHON_VERSION && \ | ||
/opt/conda/bin/conda clean -tipsy && \ | ||
ln -s /opt/conda/etc/profile.d/conda.sh /etc/profile.d/conda.sh && \ | ||
echo ". /opt/conda/etc/profile.d/conda.sh" >> ~/.bashrc && \ | ||
echo "conda activate base" >> ~/.bashrc | ||
|
||
# End Conda | ||
|
||
# Tini: https://github.com/krallin/tini | ||
ENV TINI_VERSION v0.18.0 | ||
ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /tini | ||
RUN chmod +x /tini | ||
ENTRYPOINT ["/tini", "--"] | ||
# End Tini | ||
|
||
COPY ./start.sh /start.sh | ||
RUN chmod +x /start.sh | ||
|
||
CMD [ "/start.sh" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#! /usr/bin/env sh | ||
set -e | ||
|
||
echo "conda version: $(conda --version)" | ||
|
||
python -c 'import sys; print("python version: {}.{}".format(sys.version_info.major, sys.version_info.minor))' | ||
|
||
nvidia-smi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters