-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathDockerfile
57 lines (48 loc) · 1.74 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
FROM debian:jessie
MAINTAINER kmader <[email protected]>
ENV DEBIAN_FRONTEND noninteractive
ENV CONDA_DIR /opt/conda
# Core installs
RUN apt-get update && \
apt-get install -y git vim wget build-essential python-dev ca-certificates bzip2 libsm6 && \
apt-get clean
# Install miniconda 2.7
RUN echo 'export PATH=$CONDA_DIR/bin:$PATH' > /etc/profile.d/conda.sh && \
wget --quiet https://repo.continuum.io/miniconda/Miniconda2-4.3.11-Linux-x86_64.sh && \
/bin/bash /Miniconda2-4.3.11-Linux-x86_64.sh -b -p $CONDA_DIR && \
rm Miniconda2-4.3.11-Linux-x86_64.sh && \
$CONDA_DIR/bin/conda install --yes conda==4.2.9
# Create a user
RUN useradd -m -s /bin/bash neuroglancer_user
RUN chown -R neuroglancer_user:neuroglancer_user $CONDA_DIR
# Env vars
USER neuroglancer_user
ENV HOME /home/neuroglancer_user
ENV SHELL /bin/bash
ENV USER neuroglancer_user
ENV PATH $CONDA_DIR/bin:$PATH
WORKDIR $HOME
# setup the rest of the packages
RUN conda install --yes nose numpy pandas matplotlib scipy seaborn numba bokeh pillow ipython
# Install Jupyter notebook to allow for more interactive neuroglancing
RUN conda install --quiet --yes \
'notebook=4.2*' \
&& conda clean -tipsy
# install neuroglancer from github
RUN git clone https://github.com/google/neuroglancer.git
WORKDIR neuroglancer/python
RUN ls ../../*
RUN python setup.py install
ADD docker_demo.py $HOME/docker_demo.py
ADD notebooks $HOME/notebooks
ADD test_data $HOME/test_data
USER root
RUN chown -R neuroglancer_user:neuroglancer_user $HOME/notebooks
RUN chown -R neuroglancer_user:neuroglancer_user $HOME/docker_demo.py
# Open ports for the notebook and the server
EXPOSE 8888
EXPOSE 8989
# run the notebook as a user
USER neuroglancer_user
WORKDIR $HOME
CMD jupyter notebook --ip='0.0.0.0'