Skip to content

Commit 55a452a

Browse files
author
rodriguez-facundo
committed
extend casper test to appbar
1 parent 4ee1596 commit 55a452a

4 files changed

Lines changed: 17 additions & 103 deletions

File tree

Dockerfile

Lines changed: 1 addition & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,7 @@
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
1+
FROM frodriguez4600/jupyterneurontest
292

303
# Switch to non sudo, create a Python 3 virtual environment
314
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"
475

486
ARG INCUBATOR_VER=unknown
497
RUN /bin/bash -c "INCUBATOR_VER=${INCUBATOR_VER} source activate snakes && pip install netpyne_ui"

Dockerfile_dev

Lines changed: 6 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1,63 +1,17 @@
1-
FROM jupyter/base-notebook:eb70bcf1a292
2-
USER root
1+
FROM frodriguez4600/jupyterneurontest
2+
USER $NB_USER
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-
538
# Clone NetPyNE-UI and install the development version
54-
WORKDIR ../../../
55-
RUN wget https://github.com/MetaCell/NetPyNE-UI/archive/$netpyneuiBranch.zip
9+
RUN wget https://github.com/MetaCell/NetPyNE-UI/archive/$netpyneuiBranch.zip -q
5610
RUN unzip $netpyneuiBranch.zip
57-
WORKDIR NetPyNE-UI-$netpyneuiBranch/utilities
11+
WORKDIR /home/jovyan/work/NetPyNE-UI-$netpyneuiBranch/utilities
5812
RUN /bin/bash -c "source activate snakes && python --version"
5913
RUN /bin/bash -c "source activate snakes && exec python install.py branch $netpyneuiBranch"
60-
WORKDIR /home/jovyan
14+
WORKDIR /home/jovyan/work
6115
RUN git clone https://github.com/Neurosim-lab/netpyne_workspace
62-
WORKDIR /home/jovyan/netpyne_workspace
16+
WORKDIR /home/jovyan/work/NetPyNE-UI-$netpyneuiBranch
6317
CMD /bin/bash -c "source activate snakes && exec jupyter notebook --debug --NotebookApp.default_url=/geppetto --NotebookApp.token='' --library=netpyne_ui"

netpyne_ui/netpyne_geppetto.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -439,7 +439,7 @@ def validateFunction(self, functionString):
439439

440440
def exportHLS(self, args):
441441
def convert2bool(string):
442-
return string.replace('true', 'True').replace('false', 'False')
442+
return string.replace('true', 'True').replace('false', 'False').replace('null', 'False')
443443

444444
def header(title, spacer='-'):
445445
return '\n# ' + title.upper() + ' ' + spacer*(77-len(title)) + '\n'
@@ -474,11 +474,11 @@ def header(title, spacer='-'):
474474
script.write(header('network configuration'))
475475
for attr, value in list(self.simConfig.__dict__.items()):
476476
if value!=getattr(specs.SimConfig(), attr):
477-
script.write('netParams.' + attr + ' = ')
477+
script.write('simConfig.' + attr + ' = ')
478478
script.write(convert2bool(json.dumps(value, indent=4))+'\n')
479479

480480
script.write(header('create simulate analyze network'))
481-
script.write('sim.createSimulateAnalyze(netParams=netParams, simConfig=simConfig)\n')
481+
script.write('# sim.createSimulateAnalyze(netParams=netParams, simConfig=simConfig)\n')
482482

483483
script.write(header('end script', spacer='='))
484484

utilities/install.py

Lines changed: 7 additions & 5 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):
32+
if branch and branch in str(outstd) and branch!='development':
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,7 +53,8 @@ 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-
subprocess.call(['npm', 'install'], cwd='./org.geppetto.frontend.jupyter/js')
56+
with open('npm_frontend_jupyter_log', 'a') as stdout:
57+
subprocess.call(['npm', 'install'], cwd='./org.geppetto.frontend.jupyter/js', stdout=stdout)
5758
subprocess.call(['npm', 'run', 'build-dev'], cwd='./org.geppetto.frontend.jupyter/js')
5859

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

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

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

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

0 commit comments

Comments
 (0)