From 59c587a0aa13fd4d9436092bf35c53be5329ad84 Mon Sep 17 00:00:00 2001 From: Filippo Ledda Date: Tue, 7 Nov 2023 14:47:09 +0100 Subject: [PATCH] Simplify netpyne build --- applications/netpyne/Dockerfile | 87 +------------------ .../geppetto/GeppettoConfiguration.json | 21 ----- 2 files changed, 1 insertion(+), 107 deletions(-) delete mode 100644 applications/netpyne/overrides/geppetto/GeppettoConfiguration.json diff --git a/applications/netpyne/Dockerfile b/applications/netpyne/Dockerfile index 0f93b09d..1b8f38a4 100644 --- a/applications/netpyne/Dockerfile +++ b/applications/netpyne/Dockerfile @@ -1,90 +1,5 @@ -FROM node:14 as jsbuild -ENV REPO=https://github.com/MetaCell/NetPyNE-UI.git -ENV BRANCH_TAG=release/1.0.0 -ENV FOLDER=netpyne -RUN echo "no-cache 2023-7-14" -RUN git clone $REPO -b $BRANCH_TAG $FOLDER -RUN rm -Rf .git - -COPY overrides/geppetto/GeppettoConfiguration.json $FOLDER/webapp/GeppettoConfiguration.json - -WORKDIR $FOLDER/webapp -RUN yarn install --network-timeout 1000000000 -RUN yarn build-dev - -RUN rm -Rf node_modules/* - - - -### -FROM jupyter/base-notebook:hub-1.4.2 -ENV NB_UID=jovyan -ENV FOLDER=netpyne -ENV NP_LFPYKIT_HEAD_FILE=/home/jovyan/nyhead.mat - -USER root - -RUN rm -rf /var/lib/apt/lists -RUN apt-get update -qq &&\ - apt-get install python3-tk vim nano unzip git make libtool g++ -qq pkg-config libfreetype6-dev libpng-dev libopenmpi-dev -y -RUN apt-get install openjdk-11-jre-headless -y -RUN conda install python=3.7 -y - - -WORKDIR $FOLDER -COPY --from=jsbuild --chown=1000:1000 $FOLDER/requirements.txt requirements.txt -RUN --mount=type=cache,target=/root/.cache python -m pip install --upgrade pip &&\ - pip install -r requirements.txt --prefer-binary - -COPY --from=jsbuild --chown=1000:1000 $FOLDER . - -# ToDo: fixme, for now remove the jupyter hub config json file because it overrides the default -# and thus removes the frame ancestor cors settings -RUN rm -f ~/.jupyter/*.json -RUN chown $NB_UID . -RUN chown $NB_UID /opt -RUN rm -Rf workspace - -USER $NB_UID - -# sym link workspace pvc to $FOLDER -RUN mkdir -p /opt/workspace -RUN mkdir -p /opt/user - - - - -ENV NEURON_HOME=/opt/conda - - -USER root - -RUN jupyter nbextension install --py --symlink --sys-prefix jupyter_geppetto -RUN jupyter nbextension enable --py --sys-prefix jupyter_geppetto -RUN jupyter nbextension enable --py --sys-prefix widgetsnbextension -RUN jupyter serverextension enable --py --sys-prefix jupyter_geppetto - -RUN --mount=type=cache,target=/root/.cache python -m pip install --upgrade pip &&\ - python utilities/install.py --npm-skip --no-test +FROM gcr.io/metacellllc/netpyne-ui:1.0.0-osb COPY overrides/requirements.txt overrides/requirements.txt RUN --mount=type=cache,target=/root/.cache python -m pip install --upgrade pip &&\ pip install -r overrides/requirements.txt - -RUN mv workspace /opt/workspace/tutorials -RUN chown -R $NB_UID /opt/workspace/tutorials -RUN ln -s /opt/workspace workspace - -RUN jupyter labextension disable @jupyterlab/hub-extension -RUN wget --no-check-certificate -O $NP_LFPYKIT_HEAD_FILE https://www.parralab.org/nyhead/sa_nyhead.mat - -USER $NB_UID - - -EXPOSE 8888 - -ENTRYPOINT ["tini", "-g", "--"] - - - -CMD ./NetPyNE-UI diff --git a/applications/netpyne/overrides/geppetto/GeppettoConfiguration.json b/applications/netpyne/overrides/geppetto/GeppettoConfiguration.json deleted file mode 100644 index cb076391..00000000 --- a/applications/netpyne/overrides/geppetto/GeppettoConfiguration.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "_README": "http://docs.geppetto.org/en/latest/build.html", - "contextPath": "org.geppetto.frontend", - "useSsl": true, - "embedded": true, - "embedderURL": [ - "/" - ], - "rootRedirect": "", - "noTest": false, - "themes": "css/colors", - "properties": { - "title": "NetPyNE", - "description": "NetPyNE-UI is a user interface for building, visualizing and simulationg neuronal network models using NetPyNE.", - "type": "website", - "url": "https://github.com/MetaCell/NetPyNE-UI", - "icon": "https://d30y9cdsu7xlg0.cloudfront.net/png/38902-200.png", - "image": "http://www.geppetto.org/images/logo.png" - }, - "notebookName": "notebook.ipynb" -} \ No newline at end of file