-
Notifications
You must be signed in to change notification settings - Fork 13
/
Dockerfile
65 lines (56 loc) · 2 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
58
59
60
61
62
63
64
65
FROM debian:latest
# Install necessary linux packages from apt-get
RUN apt-get update --fix-missing && apt-get install -y eatmydata
RUN eatmydata apt-get install -y wget bzip2 ca-certificates \
libglib2.0-0 libxext6 libsm6 libxrender1 \
git \
libfreetype6-dev \
swig \
mpich \
pkg-config \
gcc \
wget \
curl \
vim \
nano \
libgl1-mesa-glx \
ffmpeg \
fonts-liberation
# Install anaconda
RUN echo 'export PATH=/opt/conda/bin:$PATH' > /etc/profile.d/conda.sh && \
wget --quiet https://repo.continuum.io/archive/Anaconda3-5.2.0-Linux-x86_64.sh -O ~/anaconda.sh && \
/bin/bash ~/anaconda.sh -b -p /opt/conda && \
rm ~/anaconda.sh
# Setup anaconda path
ENV PATH /opt/conda/bin:$PATH
# Create compatibility Python 2.7 environment
RUN conda create -n py27 python=2.7
RUN ["/bin/bash", "-c", "source activate py27 && \
conda install -y numpy \
scipy \
pandas \
scikit-learn \
ipython \
matplotlib \
jupyter \
seaborn && python -m ipykernel install"]
# Install packages needed
RUN conda install -c brainiak -c defaults -c conda-forge brainiak
RUN pip install git+https://github.com/ljchang/neurolearn && pip install git+https://github.com/eackermann/hmmlearn.git && pip install pymvpa2 \
nilearn \
hypertools \
mne \
deepdish \
nelpy \
dask \
pynv \
seaborn \
supereeg && python -m ipykernel install
# Clean up
RUN conda clean --all -y && apt-get autoremove
# Create some command aliases and turn off jupyter notebook tokens
RUN echo 'alias jp="jupyter notebook --port=9999 --no-browser --ip=0.0.0.0 --allow-root"' >> /root/.bashrc
RUN echo 'alias jl="jupyter lab --port=9999 --no-browser --ip=0.0.0.0 --allow-root"' >> /root/.bashrc
RUN mkdir -p /root/.jupyter && echo "c.NotebookApp.token = u''" >> /root/.jupyter/jupyter_notebook_config.py && echo "c.NotebookApp.notebook_dir = '/mnt'" >> /root/.jupyter/jupyter_notebook_config.py
# What should we run when the container is launched
ENTRYPOINT ["/bin/bash"]