Skip to content
Snippets Groups Projects
Dockerfile 1.93 KiB
Newer Older
FROM nvidia/cuda:cudnn-runtime

MAINTAINER Tim O'Donnell <timodonnell@gmail.com>

RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections && \
Tim O'Donnell's avatar
Tim O'Donnell committed
    apt-get clean && \
    apt-get update && \
    apt-get install --yes \
        gfortran \
Tim O'Donnell's avatar
Tim O'Donnell committed
        git \
        libatlas-base-dev \
        libatlas3gf-base \
        libblas-dev \
        libfreetype6-dev \
        liblapack-dev \
        libpng12-dev \
        libxml2-dev \
        libxslt1-dev \
        pkg-config \
        python-virtualenv \
        python3-dev \
        python-dev && \
    useradd --create-home --home-dir /home/user --shell /bin/bash -G sudo user && \
    echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
        
# Set the locale (otherwise dask-distributed complains).
RUN locale-gen en_US.UTF-8
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8

USER user
ENV HOME=/home/user
ENV SHELL=/bin/bash
ENV USER=user
WORKDIR /home/user

# Setup virtual envs and install convenience packages.  Note: installing
# cherrypy as part of the mhcflurry installation weirdly fails on a unicode
# issue in python2, but installing it separately seems to work.
RUN virtualenv venv-py3 --python=python3 && \
Tim O'Donnell's avatar
Tim O'Donnell committed
    venv-py3/bin/pip install --upgrade pip && \
    venv-py3/bin/pip install --upgrade \
        numpy \
        cherrypy \
        jupyter \
        lxml \
        scipy \
        scikit-learn \
        seaborn
ENV KERAS_BACKEND theano
# RUN venv-py3/bin/pip install --upgrade https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.10.0-cp35-cp35m-linux_x86_64.whl

Tim O'Donnell's avatar
Tim O'Donnell committed
# Install mhcflurry and latest kubeface and download data and models.
Tim O'Donnell's avatar
Tim O'Donnell committed
RUN venv-py3/bin/pip install --upgrade ./mhcflurry git+https://github.com/hammerlab/kubeface.git \
    && venv-py3/bin/mhcflurry-downloads fetch
 
EXPOSE 8888
CMD venv-py3/bin/jupyter notebook --no-browser