Skip to content

Commit

Permalink
2020-01 tutorial updates (#451)
Browse files Browse the repository at this point in the history
* tutorial setup text updates, Dockerfile updates
  • Loading branch information
cyrush authored Feb 1, 2020
1 parent 4577933 commit c4ed6b6
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 51 deletions.
6 changes: 3 additions & 3 deletions src/docs/sphinx/Tutorial.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -59,10 +59,10 @@ You can find the tutorial source code and notebooks in your Ascent install direc
`Ascent Tutorial Intro Slides [pdf] <https://www.ascent-dav.org/2019_11_17_SC19_insitu_tutorial_ascent_intro_slides.pdf>`_

Scheduled Tutorials:
* `In Situ Analysis and Visualization with SENSEI and Ascent @ SC19 <https://sc19.supercomputing.org/presentation/?id=tut141&sess=sess199>`_ - 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 <https://sc19.supercomputing.org/presentation/?id=tut141&sess=sess199>`_ - Nov 2019, Denver, CO
* ECP 2018 Annual Meeting - Feb 2018, Knoxville, TX
* ECP 2019 Annual Meeting - Jan 2019, Houston, TX

Expand Down
88 changes: 44 additions & 44 deletions src/docs/sphinx/Tutorial_Setup.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Expand All @@ -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.)

Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down
10 changes: 6 additions & 4 deletions src/examples/docker/ubuntu/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -111,11 +111,11 @@ RUN cd /home/user/ascent && python scripts/uberenv/uberenv.py \
--spec "%gcc+mpi+mfem ^[email protected]" \
--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
Expand All @@ -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
Expand All @@ -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
Expand Down

0 comments on commit c4ed6b6

Please sign in to comment.