Skip to content

Commit a42c76d

Browse files
Merge pull request #102 from ContextLab/rev-2
Merging revision 2 changes into master branch
2 parents bec2c4b + eef3c75 commit a42c76d

File tree

53 files changed

+2125
-1036
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+2125
-1036
lines changed

.dockerignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*

Dockerfile

Lines changed: 157 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,157 @@
1+
FROM ubuntu:bionic
2+
3+
LABEL maintainer="Contextual Dynamics Lab <contextualdynamics@gmail.com>"
4+
5+
ARG DEBIAN_FRONTEND=noninteractive
6+
ARG WORKDIR="/mnt"
7+
ARG NOTEBOOK_IP=0.0.0.0
8+
ARG PORT=9999
9+
10+
ENV LANG=C.UTF-8 \
11+
PATH="/opt/conda/bin:$PATH" \
12+
NOTEBOOK_DIR=$WORKDIR \
13+
NOTEBOOK_IP=$NOTEBOOK_IP \
14+
NOTEBOOK_PORT=$PORT
15+
16+
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
17+
18+
RUN sed -i 's/^#force_color_prompt=yes/force_color_prompt=yes/' /etc/skel/.bashrc \
19+
&& apt-get update --fix-missing \
20+
&& apt-get install -y --no-install-recommends eatmydata \
21+
&& eatmydata apt-get install -y --no-install-recommends \
22+
bzip2 \
23+
ca-certificates \
24+
curl \
25+
gcc \
26+
git \
27+
libfontconfig1-dev \
28+
libgl1-mesa-glx -y \
29+
mpich \
30+
pkg-config \
31+
sudo \
32+
swig \
33+
vim \
34+
wget \
35+
&& apt-get clean \
36+
&& rm -rf /var/lib/apt/lists/* \
37+
&& wget --quiet https://repo.anaconda.com/miniconda/Miniconda3-4.5.4-Linux-x86_64.sh -O ~/miniconda.sh \
38+
&& /bin/bash ~/miniconda.sh -b -p /opt/conda \
39+
&& rm ~/miniconda.sh \
40+
&& conda config --set auto_update_conda false \
41+
&& conda config --set notify_outdated_conda false \
42+
&& conda install -y \
43+
_libgcc_mutex=0.1=main \
44+
blas=1.0=mkl \
45+
ca-certificates=2019.5.15=1 \
46+
certifi=2019.6.16=py36_1 \
47+
ipykernel=5.3.4 \
48+
ipython=7.16.1 \
49+
ipywidgets=7.5.1 \
50+
jinja2=2.11.2 \
51+
libedit=3.1.20181209=hc058e9b_0 \
52+
libffi=3.2.1=hd88cf55_4 \
53+
libgcc-ng=8.2.0=hdf63c60_1 \
54+
libgfortran-ng=7.3.0=hdf63c60_0 \
55+
libstdcxx-ng=8.2.0=hdf63c60_1 \
56+
mkl-service=2.0.2=py36h7b6447c_0 \
57+
mkl_fft=1.0.12=py36ha843d7b_0 \
58+
mkl_random=1.0.2=py36hd81dba3_0 \
59+
nbconvert=5.6.1 \
60+
nbformat=5.0.7 \
61+
ncurses=6.1=he6710b0_1 \
62+
notebook=6.1.4 \
63+
numpy-base=1.16.4=py36hde5b4d6_0 \
64+
openssl=1.1.1c=h7b6447c_1 \
65+
pandoc=2.10 \
66+
pip=19.0.3=py36_0 \
67+
prometheus_client=0.8.0 \
68+
python=3.6.8=h0371630_0 \
69+
pyzmq=19.0.2 \
70+
readline=7.0=h7b6447c_5 \
71+
setuptools=40.8.0=py36_0 \
72+
sqlite=3.27.2=h7b6447c_0 \
73+
terminado=0.9.1 \
74+
tk=8.6.8=hbc83047_0 \
75+
tornado=6.0.4 \
76+
traitlets=4.3.3 \
77+
wheel=0.33.1=py36_0 \
78+
widgetsnbextension=3.5.1 \
79+
xz=5.2.4=h14c3975_4 \
80+
zlib=1.2.11=h7b6447c_3 \
81+
&& conda clean -tipsy \
82+
&& pip install \
83+
alabaster==0.7.12 \
84+
babel==2.6.0 \
85+
biopython==1.74 \
86+
chardet==3.0.4 \
87+
citeproc-py==0.4.0 \
88+
cycler==0.10.0 \
89+
deepdish==0.3.6 \
90+
docutils==0.14 \
91+
duecredit==0.7.0 \
92+
future==0.17.1 \
93+
hypertools==0.5.1 \
94+
idna==2.8 \
95+
imagesize==1.1.0 \
96+
intel-openmp==2019.0 \
97+
jinja2==2.10 \
98+
jupyter_contrib_nbextensions==0.5.1 \
99+
kiwisolver==1.0.1 \
100+
llvmlite==0.28.0 \
101+
lxml==4.3.3 \
102+
markupsafe==1.1.1 \
103+
matplotlib==3.0.3 \
104+
mkl==2019.0 \
105+
mock==2.0.0 \
106+
neurosynth==0.3.8 \
107+
nibabel==2.5.0 \
108+
nose==1.3.7 \
109+
numba==0.43.1 \
110+
numexpr==2.6.9 \
111+
numpy==1.16.2 \
112+
packaging==19.0 \
113+
pandas==0.24.2 \
114+
pbr==5.1.3 \
115+
ply==3.11 \
116+
ppca==0.0.4 \
117+
pygments==2.3.1 \
118+
pyparsing==2.3.1 \
119+
python-dateutil==2.8.0 \
120+
pytz==2018.9 \
121+
requests==2.21.0 \
122+
scikit-learn==0.19.2 \
123+
scipy==1.2.1 \
124+
seaborn==0.9.0 \
125+
six==1.12.0 \
126+
snowballstemmer==1.2.1 \
127+
sphinx==2.0.0 \
128+
sphinxcontrib-applehelp==1.0.1 \
129+
sphinxcontrib-devhelp==1.0.1 \
130+
sphinxcontrib-htmlhelp==1.0.1 \
131+
sphinxcontrib-jsmath==1.0.1 \
132+
sphinxcontrib-qthelp==1.0.2 \
133+
sphinxcontrib-serializinghtml==1.1.3 \
134+
tables==3.5.1 \
135+
umap-learn==0.3.8 \
136+
urllib3==1.24.1 \
137+
git+git://github.com/lucywowen/timecorr-1.git@spot_check \
138+
git+https://github.com/FIU-Neuro/brainconn.git \
139+
&& rm -rf ~/.cache/pip \
140+
&& jupyter nbextension enable --py widgetsnbextension --sys-prefix \
141+
&& jupyter notebook --generate-config \
142+
&& ipython profile create \
143+
&& sed -i \
144+
-e 's/^# c.Completer.use_jedi = True/c.Completer.use_jedi = False/' \
145+
-e 's/^#c.Completer.use_jedi = True/c.Completer.use_jedi = False/' \
146+
-e 's/^# c.IPCompleter.use_jedi = True/c.IPCompleter.use_jedi = False/' \
147+
~/.ipython/profile_default/ipython_config.py \
148+
&& mkdir -p /root/.jupyter \
149+
&& echo "from os import getenv" > /root/.jupyter/jupyter_notebook_config.py \
150+
&& echo "c.NotebookApp.ip = getenv(\"NOTEBOOK_IP\")" >> /root/.jupyter/jupyter_notebook_config.py \
151+
&& echo "c.NotebookApp.port = int(getenv(\"NOTEBOOK_PORT\"))" >> /root/.jupyter/jupyter_notebook_config.py \
152+
&& echo "c.NotebookApp.notebook_dir = getenv(\"NOTEBOOK_DIR\")" >> /root/.jupyter/jupyter_notebook_config.py \
153+
&& echo "c.NotebookApp.open_browser = False" >> /root/.jupyter/jupyter_notebook_config.py \
154+
&& echo "c.NotebookApp.allow_root = True" >> /root/.jupyter/jupyter_notebook_config.py \
155+
&& echo "c.FileContentsManager.delete_to_trash = False" >> /root/.jupyter/jupyter_notebook_config.py
156+
157+
WORKDIR $WORKDIR

README.md

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,24 +16,26 @@ root
1616
```
1717

1818
Content of the data folder is provided [here](https://drive.google.com/file/d/1CZYe8eyAkZFuLqfwwlKoeijgkjdW6vFs/view?usp=sharing).
19-
We also include a Dockerfile to reproduce our computational environment. Instruction for use are below (copied and modified from [MIND](https://github.com/Summer-MIND/mind-tools) repo):
19+
We also include a Dockerfile to reproduce our computational environment. Instruction for use are below:
2020

21-
## One time setup
21+
22+
## Docker setup
2223
1. Install Docker on your computer using the appropriate guide below:
2324
- [OSX](https://docs.docker.com/docker-for-mac/install/#download-docker-for-mac)
2425
- [Windows](https://docs.docker.com/docker-for-windows/install/)
2526
- [Ubuntu](https://docs.docker.com/engine/installation/linux/docker-ce/ubuntu/)
2627
- [Debian](https://docs.docker.com/engine/installation/linux/docker-ce/debian/)
2728
2. Launch Docker and adjust the preferences to allocate sufficient resources (e.g. > 4GB RAM)
2829
3. Build the docker image by opening a terminal in this repo folder and enter `docker build -t timecorr_paper .`
29-
4. Use the image to create a new container for the workshop
30-
- The command below will create a new container that will map your computer's `Desktop` to `/mnt` within the container, so that location is shared between your host OS and the container. Feel free to change `Desktop` to whatever folder you prefer to share instead, but make sure to provide the full path. The command will also share port `9999` with your host computer so any jupyter notebooks launched from *within* the container will be accessible at `localhost:9999` in your web browser
31-
- `docker run -it -p 9999:9999 --name Timecorr_paper -v ~/Desktop:/mnt timecorr_paper `
30+
4. Use the image to create a new container
31+
- The command below will create a new container that will map your local copy of the repository to `/mnt` within the container, so that location is shared between your host OS and the container. The command will also share port `9999` with your host computer so any jupyter notebooks launched from *within* the container will be accessible in your web browser.
32+
- `docker run -it -p 9999:9999 --name Timecorr_paper -v $PWD:/mnt timecorr_paper `
3233
- You should now see the `root@` prefix in your terminal, if so you've successfully created a container and are running a shell from *inside*!
33-
5. To launch any of the notebooks: `jupyter notebook --port=9999 --no-browser --ip=0.0.0.0 --allow-root`
34+
5. To launch any of the notebooks: `jupyter notebook`
3435

3536
## Using the container after setup
3637
1. You can always fire up the container by typing the following into a terminal
37-
- `docker start Timecorr_paper && docker attach Timecorr_paper`
38-
- When you see the `root@` prefix, letting you know you're inside the container
39-
2. Close a running container with `ctrl + d` from the same terminal you used to launch the container, or `docker stop Timecorr_paper` from any other terminal
38+
- `docker start --attach Timecorr_paper`
39+
- When you see the `root@` prefix, you're inside the container
40+
2. Stop a running jupyter notebook server with `ctrl + c`
41+
3. Close a running container with `ctrl + d` or `exit` from the same terminal window you used to launch the container, or `docker stop Timecorr_paper` from any other terminal window

code/figs/PCA_rel_ave_width_10.pdf

-161 Bytes
Binary file not shown.

code/figs/PCA_rel_ave_width_20.pdf

-128 Bytes
Binary file not shown.

code/figs/PCA_rel_ave_width_5.pdf

-767 Bytes
Binary file not shown.

code/figs/PCA_rel_ave_width_50.pdf

-228 Bytes
Binary file not shown.
-22.3 KB
Binary file not shown.
-5.63 KB
Binary file not shown.

code/figs/high_order_sim_block.pdf

-420 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)