Created
February 23, 2017 15:23
-
-
Save joshmoore/122d5e746815bface00318af5ca8a5b1 to your computer and use it in GitHub Desktop.
jupyter Dockerfile (draft for R)
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
FROM jupyter/datascience-notebook:latest | |
MAINTAINER ome-devel@lists.openmicroscopy.org.uk | |
################################################################################ | |
# Custom | |
################################################################################ | |
USER root | |
## Swap the name of NB_USER | |
RUN usermod -l omero $NB_USER && \ | |
ln -s /home/$NB_USER /home/omero && \ | |
mkdir -p /home/omero/data && \ | |
chown omero /home/omero/data && \ | |
chmod a+X /home/omero | |
ENV NB_USER omero | |
# Note: this replaces "OMERO_DATA_DIR=/home/omero/data bash -eux step02_all_setup.sh" | |
## Do omero-install | |
ENV PATH=$CONDA_DIR/envs/python2/bin/:$PATH | |
RUN mkdir /omero-install | |
WORKDIR /omero-install | |
RUN git clone git://github.com/ome/omero-install . | |
WORKDIR /omero-install/linux | |
ENV ICEVER=ice36 | |
RUN \ | |
bash -eux step01_ubuntu1404_init.sh && \ | |
bash -eux step01_debian8_java_deps.sh && \ | |
bash -eux step01_debian8_deps.sh && \ | |
bash -eux step01_debian8_ice_deps.sh | |
## Add other dependencies | |
USER omero | |
ENV PATH=$CONDA_DIR/envs/python2/bin/:$PATH | |
WORKDIR /home/omero | |
RUN pip install omego && \ | |
omego install --ice 3.6 --no-start && \ | |
pip install markdown sklearn joblib && \ | |
conda install -c bioconda python-igraph=0.7.1.post6 && \ | |
echo 'export PYTHONPATH=$HOME/OMERO-CURRENT/lib/python' >> $HOME/.bashrc | |
## Revert PATH | |
ENV PATH=/opt/conda/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin | |
RUN echo /home/omero/OMERO-CURRENT/lib/python/ > /opt/conda/envs/python2/lib/python2.7/site-packages/omero.pth | |
## RISE | |
RUN git clone https://github.com/damianavila/RISE /tmp/RISE && \ | |
cd /tmp/RISE && $CONDA_DIR/envs/python2/bin/python setup.py install | |
## Add a notebook profile. | |
USER root | |
RUN mkdir /notebooks | |
RUN chown -R omero /notebooks | |
USER omero | |
WORKDIR /notebooks | |
RUN mkdir -p -m 700 $HOME/.jupyter/ && \ | |
echo "c.NotebookApp.ip = '*'" >> $HOME/.jupyter/jupyter_notebook_config.py | |
## Install other R tools | |
RUN pip install notedown | |
RUN conda config --add channels bioconda && \ | |
conda install --quiet --yes \ | |
'r-mclust' \ | |
'r-ggdendro' \ | |
'r-igraph' \ | |
'r-pheatmap' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment