File tree Expand file tree Collapse file tree 4 files changed +16
-4
lines changed Expand file tree Collapse file tree 4 files changed +16
-4
lines changed Original file line number Diff line number Diff line change 8080 # Install NEURON V1
8181 python -m pip install $NEURON_V1
8282 nrn_ver=`python -c "from neuron import __version__ as nrn_ver; print(nrn_ver)"`
83- runmodels $nrn_ver $MODELS_TO_RUN
83+ runmodels --virtual $nrn_ver $MODELS_TO_RUN
8484 report2html ${nrn_ver}.json
8585 python -m pip uninstall --yes $NEURON_V1
8686 echo "nrn1_ver=$nrn_ver" >> $GITHUB_ENV
9191 # Install NEURON V2
9292 python -m pip install $NEURON_V2
9393 nrn_ver=`python -c "from neuron import __version__ as nrn_ver; print(nrn_ver)"`
94- runmodels $nrn_ver $MODELS_TO_RUN
94+ runmodels --virtual $nrn_ver $MODELS_TO_RUN
9595 report2html ${nrn_ver}.json
9696 python -m pip uninstall --yes $NEURON_V2
9797 echo "nrn2_ver=$nrn_ver" >> $GITHUB_ENV
Original file line number Diff line number Diff line change @@ -25,7 +25,8 @@ The following commands are now available:
2525 runmodels -h
2626 ```
2727 Note that models have to be downloaded beforehand with ` getmodels ` .
28-
28+ You can specify ` --virtual ` so that NEURON GUI is run in headless mode. It requires a backend (n.r. ` Xvfb ` )
29+
2930
3031* ` report2html ` -> create an interactive HTML report for a given json report (obtained with ` runmodels ` )
3132 ```
Original file line number Diff line number Diff line change @@ -31,6 +31,7 @@ def runmodels(args=None):
3131
3232 Options:
3333 --gout Include gout into the report. Note that gout data can be very big, so disabled by default.
34+ --virtual Run in headless mode. You need a back-end like Xvfb.
3435
3536 Examples
3637 runmodels /path/to/workdir
@@ -40,8 +41,17 @@ def runmodels(args=None):
4041 working_dir = options .pop ("<WorkingDirectory>" )
4142 model_ids = [int (model_id ) for model_id in options .pop ("<model_id>" )]
4243 gout = options .pop ("--gout" , False )
44+ virtual = options .pop ("--virtual" , False )
4345
44- ModelRunManager (working_dir , gout = gout ).run_models (model_list = model_ids if model_ids else None )
46+ mrm = ModelRunManager (working_dir , gout = gout )
47+ model_list = model_ids if model_ids else None
48+
49+ if virtual :
50+ from pyvirtualdisplay import Display
51+ with Display () as _ :
52+ mrm .run_models (model_list )
53+ else :
54+ mrm .run_models (model_list )
4555
4656
4757def getmodels (args = None ):
Original file line number Diff line number Diff line change 33pyyaml
44docopt
55jinja2
6+ pyvirtualdisplay
67
78# for running models
89pyqt5
You can’t perform that action at this time.
0 commit comments