Skip to content

Commit 1119234

Browse files
authored
Merge pull request #765 from MetaCell/feature/readme-update
Update "installation" section of the README.md
2 parents b444bab + 7439079 commit 1119234

1 file changed

Lines changed: 47 additions & 5 deletions

File tree

README.md

Lines changed: 47 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,26 +30,59 @@ your system and you have had troubles installing it you can opt for the Virtual
3030

3131
### Python Dependencies
3232

33-
We recommend the use of a new python 3 virtual environment:
33+
We recommend the use of a new python 3.7 virtual environment.
34+
Currently, NetPyNE-UI only supports Python 3.7, but that can change in the future.
35+
36+
For NetPyNE-UI, the preferred way of creating a virtual env is to pass by conda/miniconda or mamba/micromamba.
37+
The pyenv tool can be also used, but it requires to be compiled with some special options to have NEURON running properly the simulation using `nrniv`.
38+
The reason behind this is that NEURON is distributed as a Python wheel with a specific option which force NEURON to look for the CPython dynamic lib.
39+
However, pyenv by default installs the static version of the CPython lib, resulting in `nrniv -python` not being able to run.
40+
41+
The way of creating the virtualenv using (mini)conda is the following
42+
43+
```bash
44+
conda create -n netpyne python=3.7
45+
conda activate netpyne
46+
```
47+
48+
Here is how to create the virtualenv using (micro)mamba
49+
50+
```bash
51+
mamba create -n netpyne python=3.7 -c conda-forge
52+
mamba activate netpyne
53+
```
54+
55+
You can also directly create a virtualenv using your `python3` executable, obviously if it's the 3.7 version.
3456

3557
```bash
3658
python3 -m venv npenv
3759
source npenv/bin/activate
3860
```
3961

40-
Or, with conda
62+
If you want to use anyway pyenv, here is how to properly create the virtualenv and activate it.
4163

4264
```bash
43-
conda create -n netpyne python=3.7
44-
conda activate netpyne
65+
env PYTHON_CONFIGURE_OPTS="--enable-shared" pyenv install --verbose 3.7.17
66+
pyenv virtualenv 3.7.17 netpyne
67+
pyenv shell netpyne
4568
```
4669

4770
### Run install script
4871

72+
When you are in your virtualenv, here is how you can install the "basic" version of NetPyNE-UI:
73+
4974
```bash
5075
python utilities/install.py
5176
```
5277

78+
If you want to have a different version of NetPyNE or geppetto meta, you can pass the version you want to the installer:
79+
80+
```bash
81+
python utilities/install.py --dev --netpyne development --geppetto development --no-test
82+
```
83+
84+
This command will install the `development` version of netpyne and geppetto and disable the tests during the installation.
85+
5386
### Start application
5487

5588
```bash
@@ -62,6 +95,15 @@ For debugging you can use `run.py` instead
6295
python run.py
6396
```
6497

98+
To run the UI in dev mode, you need to run `python run.py` in one terminal, and use `yarn` from the `webapp` folder, using node v14 (use `nvm` if you need to have a different version of node than the one installed on your system):
99+
100+
```bash
101+
cd webapp
102+
yarn start
103+
```
104+
105+
You can then navigate to `http://127.0.0.1:8081/` to access the dev version of the UI.
106+
65107
## Run NetPyNE User Interface in Docker
66108

67109
Ensure that you have Docker installed on your system.
@@ -75,7 +117,7 @@ docker build -t netpyne-ui .
75117
Run the image
76118

77119
```bash
78-
docker run -p 8888:8888 netpyne-ui
120+
docker run -p 8888:8888 netpyne-ui
79121
```
80122

81123
## End-to-end tests

0 commit comments

Comments
 (0)