-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Steps for running in a Docker container (#1)
* Add working Dockerfiles * Use Xvfb for headless display * Update instructions * Bump ParaView build * Clean up * Use better file naming * Fix README
- Loading branch information
1 parent
3e313f7
commit 50d340c
Showing
5 changed files
with
85 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Build from the base image so that we can develop and test rapidly | ||
# This will have ParaView and conda all set up properly | ||
FROM ipp_base | ||
|
||
WORKDIR /root | ||
COPY . ./ipyparaview/ | ||
WORKDIR /root/ipyparaview | ||
|
||
# Install ipyparaview | ||
RUN pip install -e . | ||
RUN jupyter nbextension install --py --symlink --sys-prefix ipyparaview | ||
RUN jupyter nbextension enable --py --sys-prefix ipyparaview | ||
RUN jupyter labextension install js | ||
|
||
# Set up for use | ||
WORKDIR /root/ipyparaview/notebooks | ||
|
||
ENTRYPOINT ["tini", "-g", "--", "start_xvfb.sh"] | ||
# CMD ["/bin/bash"] | ||
CMD ["jupyter", "notebook", "--port=8888", "--no-browser", "--ip=0.0.0.0", "--allow-root"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
FROM continuumio/miniconda3 AS conda | ||
LABEL Description="iPyParaView base container." | ||
|
||
SHELL ["/bin/bash", "-c"] | ||
|
||
USER root | ||
|
||
WORKDIR /root | ||
|
||
RUN apt-get update && \ | ||
apt-get install -y --no-install-recommends libgl1-mesa-dev xvfb tini && \ | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
RUN conda install --quiet --yes -c conda-forge \ | ||
ipywidgets \ | ||
jupyter \ | ||
jupyterlab \ | ||
ipython \ | ||
pillow \ | ||
paraview=5.8.0=py37ha369aaf_8 \ | ||
nodejs \ | ||
numpy \ | ||
matplotlib \ | ||
scipy | ||
|
||
COPY start_xvfb.sh /sbin/start_xvfb.sh | ||
RUN chmod a+x /sbin/start_xvfb.sh | ||
|
||
ENTRYPOINT ["tini", "-g", "--", "start_xvfb.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,20 @@ | ||
# Environment for ipyparaview with jupyterlab | ||
name: ipy_dev | ||
name: ipy_pv_dev | ||
channels: | ||
- conda-forge | ||
- nvidia | ||
- rapidsai | ||
- defaults | ||
- conda-forge | ||
dependencies: | ||
- python | ||
- ipython | ||
- pillow | ||
- pip | ||
- numpy | ||
- nodejs | ||
- rapids=0.13 # necessary for the MNIST demo | ||
- pip: | ||
- ipywidgets | ||
- jupyter | ||
- jupyterlab | ||
- pvgeo # necessary for the MNIST demo | ||
- python=3.7.4 | ||
- ipywidgets | ||
- jupyter | ||
- jupyterlab | ||
- nb_conda_kernels | ||
- ipython | ||
- pillow | ||
- paraview | ||
- nodejs | ||
- numpy | ||
- matplotlib | ||
- rapids=0.13 # necessary for the MNIST demo | ||
- pip | ||
# - pip: | ||
# - python-language-server |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/bin/bash | ||
export DISPLAY=:99.0 | ||
which Xvfb > /dev/null | ||
Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 & | ||
sleep 3 | ||
exec "$@" |