Skip to content

Commit 174abe3

Browse files
author
rodriguez-facundo
committed
revert changes to doker and intall.py
1 parent 55a452a commit 174abe3

3 files changed

Lines changed: 100 additions & 14 deletions

File tree

Dockerfile

Lines changed: 44 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,49 @@
1-
FROM frodriguez4600/jupyterneurontest
1+
FROM jupyter/base-notebook:eb70bcf1a292
2+
USER root
3+
4+
RUN apt-get -qq update
5+
RUN apt-get install -y \
6+
locales \
7+
wget \
8+
gcc \
9+
g++ \
10+
build-essential \
11+
libncurses-dev \
12+
libpython-dev \
13+
cython \
14+
libx11-dev \
15+
git \
16+
bison \
17+
flex \
18+
automake \
19+
libtool \
20+
libxext-dev \
21+
libncurses-dev \
22+
xfonts-100dpi \
23+
libopenmpi-dev \
24+
make \
25+
zlib1g-dev \
26+
unzip \
27+
vim \
28+
libpng-dev
229

330
# Switch to non sudo, create a Python 3 virtual environment
431
USER $NB_USER
32+
RUN conda create --name snakes python=3.7
33+
34+
# Install latest iv and NEURON
35+
RUN git clone --branch 7.6.2 https://github.com/neuronsimulator/nrn
36+
WORKDIR nrn
37+
RUN ./build.sh
38+
# Activate conda to configure nrn with the right python version
39+
RUN /bin/bash -c "source activate snakes && ./configure --without-x --with-nrnpython=python3 --without-paranrn --prefix='/home/jovyan/work/nrn/' --without-iv"
40+
RUN make --silent -j4
41+
RUN make --silent install -j4
42+
43+
# Install NEURON python
44+
WORKDIR src/nrnpython
45+
ENV PATH="/home/jovyan/work/nrn/x86_64/bin:${PATH}"
46+
RUN /bin/bash -c "source activate snakes && python setup.py install"
547

648
ARG INCUBATOR_VER=unknown
749
RUN /bin/bash -c "INCUBATOR_VER=${INCUBATOR_VER} source activate snakes && pip install netpyne_ui"
@@ -12,4 +54,4 @@ RUN /bin/bash -c "source activate snakes && jupyter nbextension enable --py widg
1254
WORKDIR /home/jovyan
1355
RUN git clone --branch CNS18 https://github.com/Neurosim-lab/netpyne_workspace
1456
WORKDIR /home/jovyan/netpyne_workspace
15-
CMD /bin/bash -c "source activate snakes && exec jupyter notebook --debug --NotebookApp.default_url=/geppetto --NotebookApp.token=''"
57+
CMD /bin/bash -c "source activate snakes && exec jupyter notebook --debug --NotebookApp.default_url=/geppetto --NotebookApp.token=''"

Dockerfile_dev

Lines changed: 51 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,63 @@
1-
FROM frodriguez4600/jupyterneurontest
2-
USER $NB_USER
1+
FROM jupyter/base-notebook:eb70bcf1a292
2+
USER root
33

44
ARG netpyneuiBranch=development
55
ENV netpyneuiBranch=${netpyneuiBranch}
66
RUN echo "$netpyneuiBranch";
77

8+
RUN apt-get -qq update
9+
RUN apt-get install -y \
10+
locales \
11+
wget \
12+
gcc \
13+
g++ \
14+
build-essential \
15+
libncurses-dev \
16+
libpython-dev \
17+
cython \
18+
libx11-dev \
19+
git \
20+
bison \
21+
flex \
22+
automake \
23+
libtool \
24+
libxext-dev \
25+
libncurses-dev \
26+
xfonts-100dpi \
27+
libopenmpi-dev \
28+
make \
29+
zlib1g-dev \
30+
unzip \
31+
vim \
32+
libpng-dev
33+
34+
# Switch to non sudo, create a Python 3 virtual environment
35+
USER $NB_USER
36+
RUN conda create --name snakes python=3.7
37+
38+
# Install latest iv and NEURON
39+
RUN git clone --branch 7.6.2 https://github.com/neuronsimulator/nrn
40+
WORKDIR nrn
41+
RUN ./build.sh
42+
# Activate conda to configure nrn with the right python version
43+
RUN /bin/bash -c "source activate snakes && ./configure --without-x --with-nrnpython=python3 --without-paranrn --prefix='/home/jovyan/work/nrn/' --without-iv"
44+
RUN make --silent -j4
45+
RUN make --silent install -j4
46+
47+
48+
# Install NEURON python
49+
WORKDIR src/nrnpython
50+
ENV PATH="/home/jovyan/work/nrn/x86_64/bin:${PATH}"
51+
RUN /bin/bash -c "source activate snakes && python setup.py install"
52+
853
# Clone NetPyNE-UI and install the development version
9-
RUN wget https://github.com/MetaCell/NetPyNE-UI/archive/$netpyneuiBranch.zip -q
54+
WORKDIR ../../../
55+
RUN wget https://github.com/MetaCell/NetPyNE-UI/archive/$netpyneuiBranch.zip
1056
RUN unzip $netpyneuiBranch.zip
11-
WORKDIR /home/jovyan/work/NetPyNE-UI-$netpyneuiBranch/utilities
57+
WORKDIR NetPyNE-UI-$netpyneuiBranch/utilities
1258
RUN /bin/bash -c "source activate snakes && python --version"
1359
RUN /bin/bash -c "source activate snakes && exec python install.py branch $netpyneuiBranch"
14-
WORKDIR /home/jovyan/work
60+
WORKDIR /home/jovyan
1561
RUN git clone https://github.com/Neurosim-lab/netpyne_workspace
1662
WORKDIR /home/jovyan/work/NetPyNE-UI-$netpyneuiBranch
1763
CMD /bin/bash -c "source activate snakes && exec jupyter notebook --debug --NotebookApp.default_url=/geppetto --NotebookApp.token='' --library=netpyne_ui"

utilities/install.py

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def checkout(folder, default_branch, cwdp):
2929
os.chdir(newPath)
3030
python_git=subprocess.Popen("git branch -a",shell=True,stdout=subprocess.PIPE,stderr=subprocess.PIPE)
3131
outstd,errstd=python_git.communicate()
32-
if branch and branch in str(outstd) and branch!='development':
32+
if branch and branch in str(outstd):
3333
subprocess.call(['git', 'checkout', branch], cwd='./')
3434
else:
3535
subprocess.call(['git', 'checkout', default_branch], cwd='./')
@@ -39,7 +39,7 @@ def main(argv):
3939
global branch
4040
if(len(argv) > 0):
4141
if(argv[0] == 'branch'):
42-
branch = argv[1]
42+
branch = argv[1]
4343

4444
if __name__ == "__main__":
4545
main(sys.argv[1:])
@@ -53,8 +53,7 @@ def main(argv):
5353
subprocess.call(['pip', 'install', '-e', '.'], cwd='./netpyne/')
5454

5555
clone('https://github.com/openworm/org.geppetto.frontend.jupyter.git','org.geppetto.frontend.jupyter','development')
56-
with open('npm_frontend_jupyter_log', 'a') as stdout:
57-
subprocess.call(['npm', 'install'], cwd='./org.geppetto.frontend.jupyter/js', stdout=stdout)
56+
subprocess.call(['npm', 'install'], cwd='./org.geppetto.frontend.jupyter/js')
5857
subprocess.call(['npm', 'run', 'build-dev'], cwd='./org.geppetto.frontend.jupyter/js')
5958

6059
# We can't clone org.geppetto.frontend as a regular submodule because Travis doesn't have .gitmodules in the zip
@@ -68,8 +67,7 @@ def main(argv):
6867

6968
# Installing and building
7069
print("NPM Install and build for Geppetto Frontend ...")
71-
with open('npm_frontend_log', 'a') as stdout:
72-
subprocess.call(['npm', 'install'], cwd='./netpyne_ui/geppetto/src/main/webapp/', stdout=stdout)
70+
subprocess.call(['npm', 'install'], cwd='./netpyne_ui/geppetto/src/main/webapp/')
7371
subprocess.call(['npm', 'run', 'build-dev-noTest'], cwd='./netpyne_ui/geppetto/src/main/webapp/')
7472

7573
print("Installing jupyter_geppetto python package ...")
@@ -81,4 +79,4 @@ def main(argv):
8179
subprocess.call(['jupyter', 'serverextension', 'enable', '--py', 'jupyter_geppetto'], cwd='./org.geppetto.frontend.jupyter')
8280

8381
print("Installing NetPyNE UI python package ...")
84-
subprocess.call(['pip', 'install', '-e', '.', '--no-deps'], cwd='.')
82+
subprocess.call(['pip', 'install', '-e', '.'], cwd='.')

0 commit comments

Comments
 (0)