Skip to content

Commit 58640a7

Browse files
authored
Merge pull request #949 from OpenSourceBrain/jupyterhub-update
Jupyterhub updates to PG test branch
2 parents 45358ef + 458f95d commit 58640a7

File tree

13 files changed

+300
-47
lines changed

13 files changed

+300
-47
lines changed

.github/workflows/docker-netpyne.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ jobs:
1414

1515
steps:
1616
- uses: actions/checkout@v3
17+
- name: Clone Netpyne UI dependencies
18+
run: |
19+
mkdir -p applications/netpyne/dependencies
20+
git clone --branch 1.1.0 https://github.com/MetaCell/NetPyNE-UI.git applications/netpyne/dependencies/NetPyNE-UI
1721
1822
- name: Build the Docker image
1923
run: |

.github/workflows/docker-nwbe.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
- name: Clone NWB Explorer dependencies
1818
run: |
1919
mkdir -p applications/nwb-explorer/dependencies
20-
git clone https://github.com/MetaCell/nwb-explorer.git applications/nwb-explorer/dependencies/nwb-explorer
20+
git clone --branch development https://github.com/MetaCell/nwb-explorer.git applications/nwb-explorer/dependencies/nwb-explorer
2121
2222
- name: Build the Docker image
2323
run: |

applications/accounts/docker-compose.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ services:
88
POSTGRES_USER: keycloak
99
POSTGRES_PASSWORD: password
1010
keycloak:
11-
image: quay.io/keycloak/keycloak:16.1.0
11+
image: osb/accounts
1212
environment:
1313
DB_VENDOR: POSTGRES
1414
DB_ADDR: postgres

applications/jupyterlab/overrides/index.html

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
<!doctype html>
22
<html lang="en">
33

4-
<head><meta charset="utf-8"><title>JupyterLab</title><meta name="viewport" content="width=device-width,initial-scale=1">{# Copy so we do not modify the page_config with updates. #} {% set page_config_full = page_config.copy() %} {# Set a dummy variable - we just want the side effect of the update. #} {% set _ = page_config_full.update(baseUrl=base_url, wsUrl=ws_url) %}<script id="jupyter-config-data" type="application/json">{{ page_config_full | tojson }}</script>{% block favicon %}<link rel="icon" type="image/x-icon" href="{{ base_url | escape }}static/favicons/favicon.ico" class="idle favicon"><link rel="" type="image/x-icon" href="{{ base_url | escape }}static/favicons/favicon-busy-1.ico" class="busy favicon">{% endblock %}<script defer="defer" src="{{page_config.fullStaticUrl}}/main.006c51afc5ba8822ed23.js?v=006c51afc5ba8822ed23"></script></head>
4+
<head><meta charset="utf-8"><title>JupyterLab</title><meta name="viewport" content="width=device-width,initial-scale=1">{# Copy so we do not modify the page_config with updates. #} {% set page_config_full = page_config.copy() %} {# Set a dummy variable - we just want the side effect of the update. #} {% set _ = page_config_full.update(baseUrl=base_url, wsUrl=ws_url) %}<script id="jupyter-config-data" type="application/json">{{ page_config_full | tojson }}</script>{% block favicon %}<link rel="icon" type="image/x-icon" href="{{ base_url | escape }}static/favicons/favicon.ico" class="idle favicon"><link rel="" type="image/x-icon" href="{{ base_url | escape }}static/favicons/favicon-busy-1.ico" class="busy favicon">{% endblock %} {% if custom_css %}<link rel="stylesheet" href="{{ base_url | escape }}custom/custom.css">{% endif %}<script defer="defer" src="{{page_config.fullStaticUrl}}/main.ea7277c9c015ae398545.js?v=ea7277c9c015ae398545"></script></head>
55

6-
<body>
6+
7+
8+
9+
<body class="jp-ThemedContainer">
710
<script>/* Remove token from URL. */
811
(function () {
912
var location = window.location;

applications/netpyne/Dockerfile

Lines changed: 102 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,104 @@
1-
FROM gcr.io/metacellllc/netpyne-ui:1.1.1
21

3-
COPY overrides/requirements.txt overrides/requirements.txt
2+
3+
FROM node:18 as jsbuild
4+
ARG APP_DIR=dependencies/NetPyNE-UI
5+
ENV FOLDER=netpyne
6+
7+
WORKDIR $FOLDER/webapp
8+
COPY $APP_DIR/webapp/package.json .
9+
COPY $APP_DIR/webapp/yarn.lock .
10+
11+
RUN yarn install --network-timeout 1000000000
12+
13+
COPY $APP_DIR/webapp .
14+
RUN yarn build-dev
15+
16+
### Download on a separate stage to run in parallel with buildkit
17+
FROM quay.io/jupyter/base-notebook:latest as downloads
18+
USER root
19+
RUN wget --no-check-certificate -O /nyhead.mat https://www.parralab.org/nyhead/sa_nyhead.mat
20+
21+
###
22+
FROM quay.io/jupyter/base-notebook:latest
23+
ARG APP_DIR=dependencies/NetPyNE-UI
24+
ENV NB_UID=jovyan
25+
ENV FOLDER=netpyne
26+
ENV NP_LFPYKIT_HEAD_FILE=/home/jovyan/nyhead.mat
27+
28+
USER root
29+
30+
RUN rm -rf /var/lib/apt/lists
31+
RUN apt-get update -qq &&\
32+
apt-get install python3-tk vim nano unzip git make libtool g++ -qq pkg-config libfreetype6-dev libpng-dev libopenmpi-dev -y
33+
RUN apt-get install openjdk-11-jre-headless -y
34+
# RUN conda install python=3.7 -y
35+
36+
37+
WORKDIR $FOLDER
38+
COPY overrides/requirements.txt ./requirements.txt
439
RUN --mount=type=cache,target=/root/.cache python -m pip install --upgrade pip &&\
5-
pip install -r overrides/requirements.txt
40+
pip install -r requirements.txt
41+
42+
# ToDo: fixme, for now remove the jupyter hub config json file because it overrides the default
43+
# and thus removes the frame ancestor cors settings
44+
RUN rm -f ~/.jupyter/*.json
45+
RUN chown $NB_UID .
46+
RUN chown $NB_UID /opt
47+
RUN rm -Rf workspace
48+
# sym link workspace pvc to $FOLDER
49+
RUN mkdir -p /opt/workspace
50+
RUN mkdir -p /opt/user
51+
52+
53+
COPY $APP_DIR/netpyne_ui netpyne_ui
54+
COPY $APP_DIR/utilities utilities
55+
COPY $APP_DIR/setup.py .
56+
COPY $APP_DIR/tests tests
57+
COPY $APP_DIR/NetPyNE-UI .
58+
COPY $APP_DIR/README.rst .
59+
COPY $APP_DIR/requirements-test.txt .
60+
61+
62+
USER $NB_UID
63+
64+
65+
66+
67+
ENV NEURON_HOME=/opt/conda
68+
69+
70+
USER root
71+
72+
RUN jupyter nbextension install --py --symlink --sys-prefix jupyter_geppetto
73+
RUN jupyter nbextension enable --py --sys-prefix jupyter_geppetto
74+
RUN jupyter nbextension enable --py --sys-prefix widgetsnbextension
75+
RUN jupyter serverextension enable --py --sys-prefix jupyter_geppetto
76+
77+
ARG BUILD_ARGS=""
78+
ARG WORKSPACE_VERSION=master
79+
80+
RUN --mount=type=cache,target=/home/jovyan/.cache python -m pip install --upgrade pip &&\
81+
python utilities/install.py ${BUILD_ARGS} --workspace $WORKSPACE_VERSION --npm-skip --no-test
82+
83+
84+
RUN mv workspace /opt/workspace/tutorials
85+
RUN chown -R $NB_UID /opt/workspace
86+
RUN ln -s /opt/workspace workspace
87+
88+
# RUN jupyter labextension disable @jupyterlab/hub-extension
89+
90+
COPY --from=downloads --chown=1000:1000 /nyhead.mat $NP_LFPYKIT_HEAD_FILE
91+
COPY --from=jsbuild --chown=1000:1000 $FOLDER/webapp/build webapp/build
92+
93+
RUN chown -R $NB_UID /home/jovyan/.jupyter
94+
RUN touch app.log && chown $NB_UID app.log
95+
USER $NB_UID
96+
97+
98+
EXPOSE 8888
99+
100+
101+
EXPOSE 8888
102+
103+
104+
CMD jupyter notebook --NotebookApp.default_url=/geppetto --ServerApp.token='' --ServerApp.notebook_dir=workspace --library=netpyne_ui --ServerApp.disable_check_xsrf=True
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Subproject commit 73c357ce07c9ddc6b2a77bfa32fd5e511e389818

applications/netpyne/deploy/values.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ harness:
77
deployment:
88
auto: false
99
jupyterhub:
10-
args: ["--NotebookApp.default_url=/geppetto", "--library=netpyne_ui", "--NotebookApp.notebook_dir=/opt/workspace", "--NotebookApp.disable_check_xsrf=True"]
10+
args: ["--ServerApp.default_url=/geppetto", "--library=netpyne_ui", "--NotebookApp.notebook_dir=/opt/workspace", "--NotebookApp.disable_check_xsrf=True", '--NotebookApp.tornado_settings={"headers":{"Content-Security-Policy": "frame-ancestors *;"}}']
1111
applicationHook: "osb_jupyter.change_pod_manifest"
1212
extraConfig:
1313
timing: |
@@ -18,6 +18,9 @@ harness:
1818
dependencies:
1919
hard:
2020
- jupyterhub
21+
git:
22+
- url: https://github.com/MetaCell/NetPyNE-UI.git
23+
branch_tag: 1.1.0
2124
singleuser:
2225
cpu:
2326
limit: 1
Lines changed: 167 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,168 @@
1-
lfpykit==0.5.1
2-
pyNeuroML>=0.7.5
3-
git+https://github.com/Neurosim-lab/netpyne.git@osbv2
1+
aiofiles==22.1.0
2+
aiosqlite==0.21.0
3+
airspeed==0.6.0
4+
anyio==3.7.1
5+
argon2-cffi==23.1.0
6+
argon2-cffi-bindings==21.2.0
7+
arrow==1.3.0
8+
asttokens==3.0.0
9+
attrs==25.1.0
10+
babel==2.17.0
11+
beautifulsoup4==4.13.3
12+
bleach==6.2.0
13+
blosc2==3.1.1
14+
bokeh
15+
cachetools==5.5.2
16+
cattrs==24.1.2
17+
certifi==2025.1.31
18+
cffi==1.17.1
19+
charset-normalizer==3.4.1
20+
comm==0.2.2
21+
contourpy==1.3.1
22+
cycler==0.12.1
23+
dacite==1.9.2
24+
debugpy==1.8.12
25+
decorator==5.2.1
26+
defusedxml==0.7.1
27+
Deprecated==1.2.18
28+
dnspython==2.7.0
29+
docstring_parser==0.16
30+
entrypoints==0.4
31+
executing==2.2.0
32+
fastjsonschema==2.21.1
33+
find_libpython==0.4.0
34+
fonttools==4.56.0
35+
fqdn==1.5.1
36+
future==1.0.0
37+
future-fstrings==1.2.0
38+
graphviz==0.20.3
39+
h11==0.14.0
40+
h5py==3.13.0
41+
httpcore==1.0.7
42+
httpx==0.28.1
43+
idna==3.10
44+
iniconfig==2.0.0
45+
ipykernel==6.20.2
46+
ipython==8.21.0
47+
ipython-genutils==0.2.0
48+
ipywidgets==8.1.5
49+
isoduration==20.11.0
50+
jedi==0.19.2
51+
Jinja2==2.11.2
52+
json5==0.10.0
53+
jsonpickle==4.0.2
54+
jsonpointer==3.0.0
55+
jsonschema==4.23.0
56+
jsonschema-specifications==2024.10.1
57+
jupyter==1.1.1
58+
jupyter-client==7.0.6
59+
jupyter-console==6.4.4
60+
jupyter-core==4.12.0
61+
# jupyter-events==0.12.0
62+
jupyter-geppetto==1.1.5
63+
jupyter-server==1.15.0
64+
jupyter-ydoc==0.2.5
65+
jupyter_server_ydoc==0.8.0
66+
jupyterlab==3.3.4
67+
jupyterlab_pygments==0.3.0
68+
jupyterlab-server==2.10.3
69+
jupyterlab_widgets==3.0.13
70+
jupyterthemes==0.20.0
71+
kiwisolver==1.4.8
72+
lesscpy==0.15.1
73+
LFPykit==0.5.1
74+
libNeuroML==0.5.1
75+
lxml==5.3.1
76+
MarkupSafe==1.1.1
77+
matplotlib==3.10.0
78+
matplotlib-inline==0.1.7
79+
matplotlib-scalebar==0.9.0
80+
MEAutility==1.5.2
81+
mistune==0.8.4
82+
modelspec==0.3.5
83+
msgpack==1.1.0
84+
multimethod==2.0
85+
nbclassic==0.3.7
86+
nbclient==0.10.2
87+
nbconvert==5.6.1
88+
nbformat==5.2.0
89+
ndindex==1.9.2
90+
nest-asyncio==1.6.0
91+
netpyne @ git+https://github.com/Neurosim-lab/netpyne.git@3d633bcda9a3ab3fe4a90b7c705cd3692a729185
92+
networkx==3.4.2
93+
neuromllite==0.5.4
94+
NEURON==8.2.6
95+
notebook==6.4.5
96+
notebook_shim==0.2.3
97+
numexpr==2.10.2
98+
numpy==1.26.4
99+
ordered-set==4.1.0
100+
packaging==24.2
101+
pandas==2.2.3
102+
pandocfilters==1.5.1
103+
parso==0.8.4
104+
pexpect==4.9.0
105+
pillow==11.1.0
106+
platformdirs==4.3.6
107+
pluggy==1.5.0
108+
ply==3.11
109+
prometheus_client==0.21.1
110+
prompt_toolkit==3.0.50
111+
psutil==7.0.0
112+
ptyprocess==0.7.0
113+
pure_eval==0.2.3
114+
py==1.11.0
115+
py-cpuinfo==9.0.0
116+
pycparser==2.22
117+
pyecore==0.15.2
118+
pygeppetto==0.9.0
119+
Pygments==2.19.1
120+
PyLEMS==0.5.9
121+
pymongo==4.11.1
122+
pyNeuroML==1.0.10
123+
pyparsing==3.2.1
124+
pytest==6.2.5
125+
python-dateutil==2.9.0.post0
126+
python-json-logger==3.2.1
127+
pytz==2025.1
128+
PyYAML==6.0.2
129+
pyzmq==26.2.1
130+
referencing==0.36.2
131+
requests==2.32.3
132+
RestrictedPython==8.0
133+
rfc3339-validator==0.1.4
134+
rfc3986-validator==0.1.1
135+
rpds-py==0.23.1
136+
schema==0.7.7
137+
scipy==1.15.2
138+
Send2Trash==1.8.3
139+
sentry-sdk==1.5.2
140+
setuptools==75.8.0
141+
six==1.17.0
142+
sniffio==1.3.1
143+
soupsieve==2.6
144+
stack-data==0.6.3
145+
tables==3.10.2
146+
tabulate==0.9.0
147+
terminado==0.18.1
148+
testpath==0.6.0
149+
tinycss2==1.4.0
150+
toml==0.10.2
151+
tornado==6.1
152+
tqdm==4.67.1
4153
traitlets==5.9.0
5-
jupyterhub>=4.0.0
154+
types-python-dateutil==2.9.0.20241206
155+
typing_extensions==4.12.2
156+
tzdata==2025.1
157+
uri-template==1.3.0
158+
urllib3==2.3.0
159+
wcwidth==0.2.13
160+
webcolors==24.11.1
161+
webencodings==0.5.1
162+
websocket-client==1.8.0
163+
wheel==0.45.1
164+
widgetsnbextension==4.0.13
165+
wrapt==1.17.2
166+
xyzservices==2025.1.0
167+
y-py==0.6.2
168+
ypy-websocket==0.8.4
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
nfs:
22
useDNS: true
33
server:
4-
diskSize: 40Gi
4+
diskSize: 80Gi
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Subproject commit 20e799e0076d0f965154e2a484df1f998f9e1452
1+
Subproject commit ff44c209b71b119a1d9ede41550d555e362c76e8

0 commit comments

Comments
 (0)