Skip to content

Commit 6febb66

Browse files
authored
Merge pull request #153 from MetaCell/feature/152
#152 Update to netpyne 0.9.6
2 parents 89785f0 + 0afb425 commit 6febb66

98 files changed

Lines changed: 6199 additions & 5915 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.dockerignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,7 @@ Dockerfile_dev
1313
netpyne_workspace
1414
webapp/node_modules
1515
webapp/build
16-
webapp/geppetto-client
16+
webapp/geppetto-client
17+
k8s
18+
src
19+
x86_64

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
.ipynb_checkpoints/
22
netpyne-ui.log
33
log.file
4+
src
45
*.pyc
56
*.egg-info
67
.DS_Store
@@ -20,3 +21,4 @@ npm*
2021
app.log
2122
utilities/x86_64
2223
.idea
24+
x86_64

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@ notifications:
1111
services:
1212
- docker
1313
script:
14-
- travis_retry docker build -t="netpyne-ui" --build-arg branch=$TRAVIS_BRANCH -f="./Dockerfile_dev" .
14+
- travis_retry docker build -t="netpyne-ui" --build-arg branch=$TRAVIS_BRANCH .

Dockerfile

Lines changed: 11 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,17 @@
1-
FROM metacell/jupyter-neuron:latest
1+
FROM frodriguez4600/jupyter-neuron:v7.8.0
22
USER $NB_USER
33

4-
ARG netpyneuiBranch=development
5-
ENV netpyneuiBranch=${netpyneuiBranch}
6-
RUN echo "$netpyneuiBranch";
4+
ARG branch=development
5+
RUN echo "$branch";
76

8-
ARG INCUBATOR_VER=unknown
9-
RUN /bin/bash -c "INCUBATOR_VER=${INCUBATOR_VER} source activate snakes && pip install netpyne_ui"
10-
RUN /bin/bash -c "source activate snakes && jupyter nbextension enable --py jupyter_geppetto"
11-
RUN /bin/bash -c "source activate snakes && jupyter serverextension enable --py jupyter_geppetto"
12-
RUN /bin/bash -c "source activate snakes && jupyter nbextension enable --py widgetsnbextension"
7+
ENV INSTALLATION_FOLDER=/home/jovyan/work/NetPyNE-UI
8+
WORKDIR /home/jovyan/work
139

14-
WORKDIR /home/jovyan
15-
RUN git clone --branch v0.5 https://github.com/Neurosim-lab/netpyne_workspace
16-
WORKDIR /home/jovyan/netpyne_workspace
10+
COPY --chown=1000:1000 . NetPyNE-UI
11+
WORKDIR ${INSTALLATION_FOLDER}/utilities
1712

18-
# Uncomment to run travis using this Dockerfile
19-
# Clone the source code and creates a symlink to the test folder
20-
WORKDIR /home/jovyan/work
21-
RUN wget https://github.com/MetaCell/NetPyNE-UI/archive/$netpyneuiBranch.zip -q
22-
RUN unzip $netpyneuiBranch.zip
23-
WORKDIR /home/jovyan/netpyne_workspace
24-
RUN ln -sfn /home/jovyan/work/NetPyNE-UI-$netpyneuiBranch/netpyne_ui/tests tests
13+
RUN python install.py branch $branch
14+
15+
WORKDIR ${INSTALLATION_FOLDER}
2516

26-
CMD /bin/bash -c "source activate snakes && exec jupyter notebook --debug --NotebookApp.default_url=/geppetto --NotebookApp.token='' --library=netpyne_ui --NotebookApp.disable_check_xsrf=True"
17+
CMD /bin/bash -c "jupyter notebook --NotebookApp.default_url=/geppetto --NotebookApp.token='' --library=netpyne_ui --NotebookApp.disable_check_xsrf=True"

Dockerfile_dev

Lines changed: 0 additions & 21 deletions
This file was deleted.

README.md

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
[![Docker Automated buil](https://img.shields.io/docker/automated/jrottenberg/ffmpeg.svg)](https://hub.docker.com/r/metacell/netpyne-ui/)
2-
2+
[![Build Status](https://travis-ci.org/MetaCell/NetPyNE-UI.svg?branch=master)](https://travis-ci.org/MetaCell/NetPyNE-UI)
3+
[![Codefresh build status]( https://g.codefresh.io/api/badges/pipeline/tarelli/NetPyNE-UI%2Ftest?branch=master&key=eyJhbGciOiJIUzI1NiJ9.NWFkNzMyNDIzNjQ1YWMwMDAxMTJkN2Rl.-gUEkJxH6NCCIRgSIgEikVDte-Q0BsGZKEs4uahgpzs&type=cf-1)]( https%3A%2F%2Fg.codefresh.io%2Fpipelines%2Ftest%2Fbuilds%3FrepoOwner%3DMetaCell%26repoName%3DNetPyNE-UI%26serviceName%3DMetaCell%252FNetPyNE-UI%26filter%3Dtrigger%3Abuild~Build%3Bbranch%3Amaster%3Bpipeline%3A5e5bbecc6c98a1209fc7bca3~test)
34
<p align="center">
45
<img src="https://raw.githubusercontent.com/MetaCell/NetPyNE-UI/updated_documentation/docs/netpyne.png" width="350px"/>
56
</p>
@@ -21,6 +22,24 @@ If you are familiar with NEURON and have already NEURON installed in your machin
2122
</p>
2223

2324
## Install NetPyNE User Interface from sources (for developers)
25+
26+
27+
### Python Dependencies
28+
29+
We recommend the use of a new python 3 virtual environment:
30+
31+
```bash
32+
python3 -m venv npenv
33+
source npenv/bin/activate
34+
```
35+
36+
Or, with conda
37+
38+
```bash
39+
conda create -n netpyne python=3.7
40+
conda activate netpyne
41+
```
42+
### Run install script
2443
```
2544
git clone https://github.com/MetaCell/NetPyNE-UI.git
2645
cd utilities

k8s/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM jupyterhub/k8s-hub:0.9.0-beta.4
1+
FROM jupyterhub/k8s-hub:0.9.0
22

33
COPY --chown=1000:1000 templates/page.html /usr/local/share/jupyterhub/templates/page.html
44
COPY --chown=1000:1000 templates/404.html /usr/local/share/jupyterhub/templates/404.html

k8s/README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# k8s deployment
2+
3+
- Deploy on minikube runnig
4+
5+
```bash
6+
kubectl create -ns netpyne
7+
helm upgrade netpyne jupyterhub --install --reset-values --repo https://jupyterhub.github.io/helm-chart/ --version 0.9.0 --namespace netpyne --values minikube_values.yaml --force --debug
8+
```
9+
10+
- Access the hub by running
11+
12+
```bash
13+
minikube service list
14+
```
15+
16+
and use the url corresponding to nepyne proxy-public on port 80

k8s/cf.yaml

Lines changed: 0 additions & 135 deletions
This file was deleted.

k8s/cf_pipeline.yaml

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
version: "1.0"
2+
stages:
3+
- "clone"
4+
- "build"
5+
- "deploy"
6+
steps:
7+
main_clone:
8+
type: "git-clone"
9+
description: "Cloning main repository..."
10+
repo: "MetaCell/NetPyNE-UI"
11+
revision: "${{CF_BRANCH}}"
12+
stage: "clone"
13+
when:
14+
branch:
15+
only:
16+
- "${{CF_BRANCH}}"
17+
BuildingNetPyNE-UI:
18+
title: Building NetPyNE-UI
19+
type: build
20+
stage: build
21+
image_name: netpyne-ui
22+
working_directory: ${{main_clone}}
23+
tag: '${{CF_SHORT_REVISION}}'
24+
build_arguments:
25+
- branch=${{CF_BRANCH}}
26+
registry: ${{REGISTRY}}
27+
when:
28+
branch:
29+
only:
30+
- "${{CF_BRANCH}}"
31+
BuildingHub:
32+
title: Building Hub
33+
type: build
34+
stage: "build"
35+
image_name: netpyne-hub
36+
working_directory: k8s
37+
tag: '${{CF_SHORT_REVISION}}'
38+
registry: ${{REGISTRY}}
39+
when:
40+
branch:
41+
only:
42+
- "${{CF_BRANCH}}"
43+
installing_chart:
44+
type: helm
45+
stage: deploy
46+
title: "Deploy chart"
47+
working_directory: NetPyNE-UI/k8s
48+
arguments:
49+
action: install
50+
chart_name: jupyterhub
51+
release_name: ${{RELEASE_NAME}}
52+
helm_version: 3.0.2
53+
chart_repo_url: 'https://jupyterhub.github.io/helm-chart/'
54+
chart_version: '0.9.0'
55+
kube_context: ${{CLUSTER_NAME}}
56+
namespace: ${{NAMESPACE}}
57+
custom_value_files:
58+
- 'cf_values.yaml'
59+
custom_values:
60+
- 'hub_image_tag=${{CF_SHORT_REVISION}}'
61+
- 'singleuser_image_tag=${{CF_SHORT_REVISION}}'
62+
- 'proxy_secretToken=${{SECRET_TOKEN}}'

0 commit comments

Comments
 (0)