Creating an environment with Anaconda & Python 3.6

This guide provides the configuration steps required to build a reproducible build environment on Domino. This build environment includes the following tools and interpreters:

  • Anaconda 4.2.0
  • Python 3.6
  • Jupyter Notebook
  • RStudio

Pre-requisites

You will need a Domino account along with familiarity on creating a new environment. Take a look at the Compute Environment Management guide for details on how to create and access an environment.

Once you have an environment you wish to configure, select "Edit Definition" or "Edit Dockerfile" and populate the fields below with the given configuration. Build times for environments may vary depending on the time needed to install the packages.

Docker Settings

Base Image

Custom image:

quay.io/domino/base:2016-12-07_1239_flat2

Dockerfile Instructions

USER root
 
RUN \
  # Install Anaconda for Python 3.6 v 4.2.0 (current as of 09/20/2017)
  wget -q https://repo.continuum.io/archive/Anaconda3-4.4.0.1-Linux-ppc64le.sh -O anaconda.sh  \
  && yes | bash anaconda.sh -b -p /usr/local/anaconda \ 
  && export PATH=/usr/local/anaconda/bin:$PATH \
  && conda update -q -y --all \
  && ipython kernel install
 
# required to set up PATH for the root user
ENV PATH /usr/local/anaconda/bin:$PATH     
 
RUN \
  # IPython, Python 3.6; conda can't install due to permissions; conda install soft-linked \
  export PATH=/usr/local/anaconda/bin:$PATH \ 
  && echo 'export PATH=/usr/local/anaconda/bin:${PATH:-}' >> /home/ubuntu/.domino-defaults \
 
 # Allow conda install to access install directory
&& chown ubuntu:ubuntu -R /usr/local/anaconda \
&& chown ubuntu:ubuntu -R /home/ubuntu/*
 
# Disable password authentication with newest Jupyter
RUN printf "\nc.NotebookApp.token = u'' \n\n" >> /home/ubuntu/.jupyter/jupyter_notebook_config.py
 
# Point pip to useing the one in Anaconda
RUN \
rm /usr/local/bin/pip && \
ln -s /usr/local/anaconda/bin/pip /usr/local/bin/pip
 
RUN pip install cairocffi     # required for Python 3
Was this article helpful?
0 out of 0 found this helpful