Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MRG] fix binder #809

Merged
merged 2 commits into from
Jul 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 25 additions & 36 deletions doc/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM jupyter/minimal-notebook:65761486d5d3
FROM jupyter/minimal-notebook:x86_64-2022-10-09

MAINTAINER Jupyter Help <[email protected]>

Expand All @@ -7,6 +7,7 @@ USER root
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update && apt-get -yq dist-upgrade \
&& apt-get install -yq --no-install-recommends \
build-essential \
openssh-client \
vim \
curl \
Expand All @@ -19,61 +20,49 @@ RUN apt-get update && apt-get -yq dist-upgrade \
USER $NB_UID

RUN pip install --upgrade pip
RUN npm i npm@latest -g

USER $NB_UID

RUN pip install --upgrade pip
RUN npm i npm@latest -g

USER root

RUN apt-get install -yq --no-install-recommends \
xvfb \
x11-utils \
libx11-dev \
qt5-default \
qtbase5-dev \
qt5-qmake \
libncurses-dev \
flex \
bison \
&& apt-get clean

USER ${NB_UID}
ENV DISPLAY=:99

USER $NB_UID

RUN pip install numpy && \
RUN pip install vtk && \
pip install numpy && \
pip install scipy && \
pip install matplotlib && \
pip install pyqt5 && \
pip install 'ipywidgets<=7.7.1' && \
pip install pillow && \
pip install https://api.github.com/repos/mne-tools/mne-python/zipball/master

RUN pip install mpi4py

RUN git clone https://github.com/neuronsimulator/nrn && \
cd nrn && \
./build.sh && \
./configure --with-nrnpython=python3 --without-iv --prefix=$HOME && \
make -j4 && \
make install -j4 && \
cd src/nrnpython/ && \
python3 setup.py install
pip install xvfbwrapper && \
pip install pyvista && \
pip install pyvistaqt && \
pip install nibabel && \
pip install ipyevents && \
pip install darkdetect

ENV PATH=${PATH}:${HOME}/x86_64/bin
USER ${NB_UID}

RUN git clone https://github.com/jonescompneurolab/hnn-core.git && \
cd hnn-core && \
make && \
python setup.py develop
RUN pip install mpi4py

ENV PATH=${PATH}:${HOME}/hnn-core/x86_64/
RUN pip install mne && pip install hnn_core

RUN git init . && \
git remote add origin https://github.com/jonescompneurolab/hnn-core.git && \
git fetch origin gh-pages && \
git checkout gh-pages
git fetch origin gh-pages && \
git checkout gh-pages

# Add an x-server to the entrypoint. This is needed by Mayavi
ENTRYPOINT ["tini", "-g", "--", "xvfb-run"]
ENV PYVISTA_TRAME_SERVER_PROXY_PREFIX='/proxy/'

ENV JUPYTERHUB_SERVICE_PREFIX='/proxy/'

# CMD ["jupyter", "notebook", "--ip", "0.0.0.0"]
# Add an x-server to the entrypoint. This is needed by Mayavi
ENTRYPOINT ["tini", "-g", "--", "xvfb-run"]
5 changes: 5 additions & 0 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,11 @@
filepath_prefix = 'v{}'.format(version)

sphinx_gallery_conf = {
'first_notebook_cell': ("import pyvista as pv\n"
"from mne.viz import set_3d_backend\n"
"set_3d_backend('notebook')\n"
"pv.set_jupyter_backend('client')"
),
'doc_module': 'hnn_core',
# path to your examples scripts
'examples_dirs': '../examples',
Expand Down
Loading