diff --git a/doc/Dockerfile b/doc/Dockerfile index d1d33bdb2..16b00bd11 100644 --- a/doc/Dockerfile +++ b/doc/Dockerfile @@ -1,4 +1,4 @@ -FROM jupyter/minimal-notebook:65761486d5d3 +FROM jupyter/minimal-notebook:x86_64-2022-10-09 MAINTAINER Jupyter Help @@ -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 \ @@ -19,12 +20,6 @@ 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 @@ -32,48 +27,42 @@ 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"] diff --git a/doc/conf.py b/doc/conf.py index b6f6711da..b4d1436f3 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -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',