From 2c66af7d990c30053b6159ee9dac646b578002df Mon Sep 17 00:00:00 2001 From: Tetsuo Koyama Date: Sat, 19 Aug 2023 20:09:55 +0900 Subject: [PATCH] Update Dockerfile to same with pyvista-examples (#154) * Update Dockerfile to same with pyvista-examples * Create requirements_binder.txt * Update Dockerfile * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Create start * Update conf.py --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- Dockerfile | 21 +++++---------------- doc/source/conf.py | 2 +- requirements_binder.txt | 5 +++++ start | 3 +++ 4 files changed, 14 insertions(+), 17 deletions(-) create mode 100644 requirements_binder.txt create mode 100644 start diff --git a/Dockerfile b/Dockerfile index 0a448c95f..c96701f1d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,17 +1,6 @@ -FROM ghcr.io/pyvista/pyvista:v0.41.1 -MAINTAINER "PyVista Developers" -SHELL ["/bin/bash", "-c"] +ARG BASE_IMAGE_TAG=latest +FROM ghcr.io/pyvista/pyvista:$BASE_IMAGE_TAG - -COPY . $HOME - -RUN pip install pyvista -RUN pip install pyinstaller==5.1 -RUN pip install sphinx -RUN pip install jupyterlab -RUN pip install tqdm -RUN pip install imageio>=2.5.0 -RUN pip install imageio-ffmpeg -RUN pip install matplotlib -RUN pip install cmocean -RUN pip install trame +COPY . ${HOME} +WORKDIR ${HOME} +RUN pip install -r requirements_binder.txt diff --git a/doc/source/conf.py b/doc/source/conf.py index 966782cb9..33e887c3a 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -235,7 +235,7 @@ def __repr__(self): 'repo': "pyvista-tutorial", 'branch': "gh-pages", 'binderhub_url': "https://mybinder.org", - 'dependencies': "../../Dockerfile", + 'dependencies': ["../../Dockerfile", "../../start"], 'use_jupyter_lab': True, }, 'reset_modules': (ResetPyVista(),), diff --git a/requirements_binder.txt b/requirements_binder.txt new file mode 100644 index 000000000..c96360951 --- /dev/null +++ b/requirements_binder.txt @@ -0,0 +1,5 @@ +hypothesis +lxml +pyct +rtree +tqdm diff --git a/start b/start new file mode 100644 index 000000000..9867a8fe5 --- /dev/null +++ b/start @@ -0,0 +1,3 @@ +#!/bin/bash +export PYVISTA_TRAME_SERVER_PROXY_PREFIX="$JUPYTERHUB_SERVICE_PREFIX/proxy/" +exec "$@"