Skip to content

Commit 7439079

Browse files
committed
Merge branch 'development' of github.com:MetaCell/NetPyNE-UI into feature/readme-update
2 parents 2586be8 + 6937f1b commit 7439079

4 files changed

Lines changed: 57 additions & 36 deletions

File tree

Dockerfile

Lines changed: 49 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,67 +1,88 @@
1-
FROM node:14.21.3-bullseye as jsbuild
1+
FROM node:14 as jsbuild
22

3-
WORKDIR /app
4-
5-
COPY --chown=1000:1000 webapp/package.json .
6-
COPY --chown=1000:1000 webapp/yarn.lock .
3+
ENV FOLDER=netpyne
4+
RUN echo "no-cache 2023-7-14"
75

6+
WORKDIR $FOLDER/webapp
7+
COPY webapp/package.json .
8+
COPY webapp/yarn.lock .
89

910
RUN yarn install --network-timeout 1000000000
1011

11-
COPY webapp/ .
12+
COPY webapp .
1213
RUN yarn build-dev
1314

14-
1515
RUN rm -Rf node_modules/*
1616

17+
18+
1719
###
1820
FROM jupyter/base-notebook:hub-1.5.0
1921
ENV NB_UID=jovyan
2022
ENV FOLDER=netpyne
21-
ARG BUILD_ARGS=""
22-
ARG WORKSPACE_VERSION=master
23-
# ARG GEPPETTO_VERSION=development
24-
# ARG NETPYNE_VERSION=master
25-
26-
ENV FOLDER=/home/jovyan/work/NetPyNE-UI
23+
ENV NP_LFPYKIT_HEAD_FILE=/home/jovyan/nyhead.mat
2724

2825
USER root
2926

3027
RUN rm -rf /var/lib/apt/lists
3128
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 openjdk-11-jre-headless -y -y
29+
apt-get install python3-tk vim nano unzip git make libtool g++ -qq pkg-config libfreetype6-dev libpng-dev libopenmpi-dev -y
30+
RUN apt-get install openjdk-11-jre-headless -y
3331
RUN conda install python=3.7 -y
3432

33+
3534
WORKDIR $FOLDER
36-
COPY --chown=1000:1000 requirements.txt requirements.txt
37-
RUN --mount=type=cache,target=/root/.cache python -m pip install --upgrade pip && pip install -r requirements.txt --prefer-binary
35+
COPY --chown=1000:1000 requirements.txt requirements.txt
36+
RUN --mount=type=cache,target=/root/.cache python -m pip install --upgrade pip &&\
37+
pip install -r requirements.txt --prefer-binary
38+
39+
COPY . .
40+
COPY --from=jsbuild --chown=1000:1000 $FOLDER/webapp/build webapp/build
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+
49+
USER $NB_UID
50+
51+
# sym link workspace pvc to $FOLDER
52+
RUN mkdir -p /opt/workspace
53+
RUN mkdir -p /opt/user
3854

39-
COPY --chown=jovyan:1000 . .
40-
COPY --from=jsbuild --chown=jovyan:1000 /app webapp
4155

4256

57+
58+
ENV NEURON_HOME=/opt/conda
59+
60+
61+
USER root
62+
4363
RUN jupyter nbextension install --py --symlink --sys-prefix jupyter_geppetto
4464
RUN jupyter nbextension enable --py --sys-prefix jupyter_geppetto
4565
RUN jupyter nbextension enable --py --sys-prefix widgetsnbextension
4666
RUN jupyter serverextension enable --py --sys-prefix jupyter_geppetto
4767

48-
RUN python utilities/install.py ${BUILD_ARGS} --workspace $WORKSPACE_VERSION
68+
RUN --mount=type=cache,target=/root/.cache python -m pip install --upgrade pip &&\
69+
python utilities/install.py --npm-skip --no-test
4970

50-
RUN jupyter labextension disable @jupyterlab/hub-extension
5171

52-
RUN chown $NB_UID .
53-
RUN chown -R $NB_UID workspace
72+
RUN mv workspace /opt/workspace/tutorials
73+
RUN chown -R $NB_UID /opt/workspace/tutorials
74+
RUN ln -s /opt/workspace workspace
5475

55-
# Temp fixes for eeg plots
56-
ENV NEURON_HOME=/opt/conda
57-
# For lfpykit 0.4
58-
# RUN wget -P $(pip show LFPykit | grep "Location:" | awk '{print $2"/lfpykit"}') https://www.parralab.org/nyhead/sa_nyhead.mat
59-
# For lpfykit 0.5
60-
ENV NP_LFPYKIT_HEAD_FILE=/home/jovyan/nyhead.mat
76+
RUN jupyter labextension disable @jupyterlab/hub-extension
6177
RUN wget --no-check-certificate -O $NP_LFPYKIT_HEAD_FILE https://www.parralab.org/nyhead/sa_nyhead.mat
6278

6379
USER $NB_UID
6480

81+
6582
EXPOSE 8888
6683

84+
ENTRYPOINT ["tini", "-g", "--"]
85+
86+
6787

88+
CMD ./NetPyNE-UI

tests/frontend/e2e/tests/RxD.test.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -230,11 +230,7 @@ describe('RxD testing', () => {
230230

231231
await page.waitForSelector('button[aria-selected="true"][id = "simple-tab-1"]')
232232

233-
const no_regions_text = await page.$$eval('#simple-tabpanel-1', no_regions_text => {
234-
return no_regions_text.map(no_regions_text => no_regions_text.innerText)
235-
})
236-
237-
expect(no_regions_text).toContain('There are no Species yet.')
233+
await page.waitForSelector('#ip3')
238234
console.log('Species tab opened')
239235
await page.waitForTimeout(PAGE_WAIT)
240236

webapp/GeppettoConfiguration.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"_README" : "http://docs.geppetto.org/en/latest/build.html",
33
"contextPath": "org.geppetto.frontend",
4-
"useSsl": false,
5-
"embedded": false,
4+
"useSsl": true,
5+
"embedded": true,
66
"embedderURL": ["/"],
77
"rootRedirect":"",
88
"noTest": false,

webapp/components/general/NetPyNEField.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,11 @@ export default class NetPyNEField extends Component {
4646
!this.model.split('.')[0].startsWith('simConfig')
4747
|| this.model.split('.')[1].startsWith('analysis')
4848
) {
49-
Utils.execPythonMessage(`del netpyne_geppetto.${this.model}`);
49+
Utils.execPythonMessage(`
50+
try:
51+
del netpyne_geppetto.${this.model}
52+
except KeyError:
53+
...`);
5054
}
5155
}
5256
return value;

0 commit comments

Comments
 (0)