From c4ed6b6d526ec2549e7b21703c748d28bc9093e4 Mon Sep 17 00:00:00 2001 From: Cyrus Harrison Date: Fri, 31 Jan 2020 20:17:53 -0800 Subject: [PATCH] 2020-01 tutorial updates (#451) * tutorial setup text updates, Dockerfile updates --- src/docs/sphinx/Tutorial.rst | 6 +- src/docs/sphinx/Tutorial_Setup.rst | 88 +++++++++++++-------------- src/examples/docker/ubuntu/Dockerfile | 10 +-- 3 files changed, 53 insertions(+), 51 deletions(-) diff --git a/src/docs/sphinx/Tutorial.rst b/src/docs/sphinx/Tutorial.rst index b9597983e..b53a28364 100644 --- a/src/docs/sphinx/Tutorial.rst +++ b/src/docs/sphinx/Tutorial.rst @@ -47,7 +47,7 @@ Tutorial This tutorial introduces how to use Ascent, including basics about: - - Formating mesh data for Ascent + - Formatting mesh data for Ascent - Using Conduit and Ascent's Conduit-based API - Using and combining Ascent's core building blocks: Scenes, Pipelines, Extracts, Queries, and Triggers - Using Ascent with the Cloverleaf3D example integration @@ -59,10 +59,10 @@ You can find the tutorial source code and notebooks in your Ascent install direc `Ascent Tutorial Intro Slides [pdf] `_ Scheduled Tutorials: - * `In Situ Analysis and Visualization with SENSEI and Ascent @ SC19 `_ - Nov 2019, Denver, CO - * ECP 2020 Annual Meeting - Feb 2020, Houston, TX + * ECP 2020 Annual Meeting - Feb 2020, Houston, TX Past Tutorials: + * `In Situ Analysis and Visualization with SENSEI and Ascent @ SC19 `_ - Nov 2019, Denver, CO * ECP 2018 Annual Meeting - Feb 2018, Knoxville, TX * ECP 2019 Annual Meeting - Jan 2019, Houston, TX diff --git a/src/docs/sphinx/Tutorial_Setup.rst b/src/docs/sphinx/Tutorial_Setup.rst index 75baeddbc..1b98b9807 100644 --- a/src/docs/sphinx/Tutorial_Setup.rst +++ b/src/docs/sphinx/Tutorial_Setup.rst @@ -48,11 +48,11 @@ Tutorial Setup The tutorial examples are installed with Ascent to the subdirectory ``examples/ascent/tutorial/``. Below are several options for using pre-built Ascent installs and links to info about building Ascent. If you have access to Docker, the easiest way to test the waters is via the ``alpinedav/ascent`` Docker image. -SC19 Tutorial Cloud Option -~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Tutorial Cloud Option +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -For SC19, we plan to have several instances of our Ascent Docker image up and running the jupyter notebook server. -We will provide IP addresses and login info to attendees. +For in person tutorials (at Supercomputing, the ECP Annual Meeting, etc), we provide HTTP access to several instances of our Ascent Docker image running the jupyter notebook server. +We hand out IP addresses and login info to attendees during these events. Using Docker ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -69,7 +69,7 @@ After the download completes, create and run a container using this image: .. code:: - docker run -p 8000:8000 run -p 8888:8888 -p 10000:10000 -t -i alpinedav/ascent + docker run -p 8000:8000 -p 8888:8888 -p 10000:10000 -t -i alpinedav/ascent (The ``-p`` is used to forward ports between the container and your host machine, we use these ports to allow web servers on the container to serve data to the host.) @@ -92,7 +92,7 @@ To launch the a jupyter notebook server run: ./ascent_docker_run_jupyter.sh -This will launch a notebook server on port 8888. Assuming you forwarded port 8888 from the Docker container to your host machine, you should be able to connect to the notebook server using http://localhost:8888. The current password for the notebook server is: ``ascentsc19`` +This will launch a notebook server on port 8888. Assuming you forwarded port 8888 from the Docker container to your host machine, you should be able to connect to the notebook server using http://localhost:8888. The current password for the notebook server is: ``learn`` NERSC Cori Install @@ -137,44 +137,44 @@ You can copy the tutorial examples from this install and use them as follows: cd python python ascent_first_light_example.py - -SC19 Tutorial VM Option -~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Ascent is also installed on the SC19 SENSEI + Ascent Example VM Image. The install is located at ``/home/in-situ-user/ascent/current``. You can use the tutorial examples as follows: - -.. code:: - - # - # source helper script with Ascent paths - # - source /home/in-situ-user/ascent/current/setup_ascent_env.sh - - # - # build cpp examples and run the first one - # - cd /home/in-situ-user/ascent/current/ascent-install/examples/ascent/tutorial/ascent_intro/cpp - make - ./ascent_first_light_example - - # - # run a python example - # - cd .. - cd python - python ascent_first_light_example.py - - -This install also includes jupyter, you can launch the notebook server with: - -.. code:: - - jupyter notebook - - -The jupyter examples are at: - -`/home/in-situ-user/ascent/current/ascent-install/examples/ascent/tutorial/ascent_intro/` +.. +.. SC19 Tutorial VM Option +.. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.. +.. Ascent is also installed on the SC19 SENSEI + Ascent Example VM Image. The install is located at ``/home/in-situ-user/ascent/current``. You can use the tutorial examples as follows: +.. +.. .. code:: +.. +.. # +.. # source helper script with Ascent paths +.. # +.. source /home/in-situ-user/ascent/current/setup_ascent_env.sh +.. +.. # +.. # build cpp examples and run the first one +.. # +.. cd /home/in-situ-user/ascent/current/ascent-install/examples/ascent/tutorial/ascent_intro/cpp +.. make +.. ./ascent_first_light_example +.. +.. # +.. # run a python example +.. # +.. cd .. +.. cd python +.. python ascent_first_light_example.py +.. +.. +.. This install also includes jupyter, you can launch the notebook server with: +.. +.. .. code:: +.. +.. jupyter notebook +.. +.. +.. The jupyter examples are at: +.. +.. `/home/in-situ-user/ascent/current/ascent-install/examples/ascent/tutorial/ascent_intro/` Build and Install diff --git a/src/examples/docker/ubuntu/Dockerfile b/src/examples/docker/ubuntu/Dockerfile index 39eedeea9..1064c2f20 100644 --- a/src/examples/docker/ubuntu/Dockerfile +++ b/src/examples/docker/ubuntu/Dockerfile @@ -111,11 +111,11 @@ RUN cd /home/user/ascent && python scripts/uberenv/uberenv.py \ --spec "%gcc+mpi+mfem ^python@3.6.3" \ --spack-config-dir=scripts/uberenv/spack_configs/docker/ubuntu/ -# install jupyter, matplotlib, and bash_kernel via pip +# install jupyter, matplotlib, etc via pip RUN /home/user//ascent/uberenv_libs/spack/opt/spack/*/*/python*/bin/pip \ install \ --trusted-host pypi.org --trusted-host files.pythonhosted.org \ - jupyter matplotlib bash_kernel + jupyter matplotlib bash_kernel scipy scikit-learn torch # configure a debug build with cmake RUN cd /home/user/ascent && mkdir build-debug @@ -126,7 +126,7 @@ RUN cd /home/user/ascent/build-debug && \ -C ../uberenv_libs/*.cmake \ ../src -# build, test, and install conduit +# build, test, and install ascent RUN cd /home/user/ascent/build-debug && make RUN cd /home/user/ascent/build-debug && env CTEST_OUTPUT_ON_FAILURE=1 make test RUN cd /home/user/ascent/build-debug && make install @@ -152,7 +152,9 @@ RUN chmod 0600 ~/.ssh/authorized_keys # setup jupyter password RUN mkdir /home/user/.jupyter/ -RUN echo "c.NotebookApp.password = 'sha1:d8baf2aa447b:aa60264fe892fc31c80c4650d49b1adeaa09944e'" > /home/user/.jupyter/jupyter_notebook_config.py +# the password is: +# learn +RUN echo "c.NotebookApp.password = 'sha1:9777986fd066:283f673e1a311e2d5ef58c174eaebf3e1cb536dd'" > /home/user/.jupyter/jupyter_notebook_config.py # gen env script that points to spack installs of tpls RUN cd /home/user/ascent && python scripts/gen_spack_env_script.py cmake mpi python