Skip to content

Commit a49ceb2

Browse files
committed
#277 Implement fix 1: force neuron.nrn_dll_loaded
With this fix workspace mod mechanisms won't be loaded twice. See issue #277 for more info
1 parent 28e723e commit a49ceb2

6 files changed

Lines changed: 7 additions & 6 deletions

File tree

.dockerignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Dockerfile_dev
1313
webapp/node_modules
1414
webapp/build
1515
webapp/geppetto-client
16-
netpyne_workspace
16+
workspace
1717
tests
1818
k8s
1919
src

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ init.py
1313
webapp/node_modules
1414
webapp/geppetto-client
1515
webapp/build
16-
netpyne_workspace
16+
workspace
1717
tests/frontend/e2e/node_modules
1818
Dockerfile_mini
1919
npm*

jupyter_hub/Dockerfile_spawner

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ RUN /bin/bash -c "source activate snakes && python --version"
2121
RUN /bin/bash -c "source activate snakes && exec python install.py branch $netpyneuiBranch"
2222
WORKDIR /home/jovyan
2323
RUN git clone https://github.com/Neurosim-lab/netpyne_workspace
24-
WORKDIR /home/jovyan/netpyne_workspace
24+
WORKDIR /home/jovyan/workspace
2525
RUN ln -sfn /home/jovyan/work/NetPyNE-UI-$netpyneuiBranch/netpyne_ui/tests tests
2626

2727
# Copy jupyterhub_config

netpyne_ui/constants.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import os
22

33
UPLOAD_FOLDER_NAME = 'uploads'
4-
NETPYNE_WORKDIR = 'netpyne_workspace'
4+
NETPYNE_WORKDIR = 'workspace'
55

66
ALLOWED_EXTENSIONS = ["py", "zip", "gz", ".tar.gz", "pdf", "txt", "xls", "png", "jpeg", "hoc"]
77

netpyne_ui/netpyne_geppetto.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828

2929
os.chdir(NETPYNE_WORKDIR_PATH)
3030

31+
neuron.nrn_dll_loaded.append("/home/user/NetPyNE-UI/workspace/mod") # Avoids to load workspace modfiles twice
3132

3233
class NetPyNEGeppetto:
3334

utilities/install.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
JUPYTER_DIR = 'jupyter-geppetto'
2222
NETPYNE_DIR = 'netpyne'
2323

24-
WORKSPACE_DIR = 'netpyne_workspace'
24+
WORKSPACE_DIR = 'workspace'
2525

2626
os.environ['JUPYTER_CONFIG_DIR'] = os.path.join(ROOT_DIR, '.jupyter-config')
2727

@@ -109,7 +109,7 @@ def main(netpyne_branch, workspace_branch, pygeppetto_branch=None, jupyter_geppe
109109

110110
os.chdir(ROOT_DIR)
111111
cprint("Cloning workspace")
112-
clone(repository=WORKSPACE, branch_or_tag=workspace_branch, cwdp=ROOT_DIR)
112+
clone(repository=WORKSPACE, branch_or_tag=workspace_branch, folder=WORKSPACE_DIR, cwdp=ROOT_DIR)
113113
cprint("Compiling workspace modules")
114114
compile_mod()
115115

0 commit comments

Comments
 (0)