generated from jhudsl/OTTR_Template
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #210 from jhudsl/add-jupyter-launch
add jupyter launch child doc
- Loading branch information
Showing
4 changed files
with
287 additions
and
2 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
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,210 @@ | ||
```{r, include = FALSE} | ||
if (!exists("AnVIL_module_settings")) { | ||
AnVIL_module_settings <- list( | ||
audience = "general" | ||
) | ||
} else if (is.null(AnVIL_module_settings$audience)) { | ||
AnVIL_module_settings$audience = "general" | ||
} | ||
``` | ||
|
||
```{r, include=FALSE} | ||
# settings for warning about controlling costs | ||
# default | ||
AnVIL_module_settings$text <- "AnVIL is very versatile and can scale up to use very powerful cloud computers. It's very important that you select a cloud computing environment appropriate to your needs to avoid runaway costs. If you are uncertain, start with the default settings; it is fairly easy to increase your compute resources later, if needed, but harder to scale down." | ||
if (AnVIL_module_settings$audience == "student") { | ||
AnVIL_module_settings$text <- "AnVIL is very versatile and can scale up to use very powerful cloud computers. It's very important that you select the cloud computing environment described here to avoid runaway costs." | ||
} | ||
``` | ||
|
||
:::{.warning} | ||
`r AnVIL_module_settings$text` | ||
::: | ||
|
||
`r if( !(AnVIL_module_settings$audience == "student") ) {'Note that, in order to use Jupyter, you must have access to a Terra Workspace with permission to compute (i.e. you must be a "Writer" or "Owner" of the Workspace).'}` | ||
|
||
1. Open Terra - use a web browser to go to [`anvil.terra.bio`](https://anvil.terra.bio/) | ||
|
||
1. In the drop-down menu on the left, navigate to "Workspaces". Click the triple bar in the top left corner to access the menu. Click "Workspaces". | ||
|
||
```{r, echo=FALSE, fig.alt='Screenshot of Terra drop-down menu. The "hamburger" button to extend the drop-down menu is highlighted, and the menu item "Workspaces" is highlighted.'} | ||
ottrpal::include_slide("https://docs.google.com/presentation/d/1-IU5l40UxmpoBqFimSUmT1PNEUij2UnXMslOsiG5ncE/edit#slide=id.g117989bd49c_0_150") | ||
``` | ||
|
||
1. Click on the name of your Workspace. You should be routed to a link that looks like: `https://anvil.terra.bio/#workspaces/<billing-project>/<workspace-name>`. | ||
|
||
1. Click on the cloud icon on the far right to access your Cloud Environment options. | ||
|
||
```{r, echo=FALSE, fig.alt='Screenshot of a Terra Workspace. The cloud icon to create a new cloud environment is highlighted.'} | ||
ottrpal::include_slide("https://docs.google.com/presentation/d/1-IU5l40UxmpoBqFimSUmT1PNEUij2UnXMslOsiG5ncE/edit#slide=id.g14ea2db115d_0_22") | ||
``` | ||
|
||
1. In the dialogue box, click the "Settings" button under Jupyter. | ||
|
||
```{r, echo=FALSE, fig.alt='Screenshot of the Cloud Environment Details dialogue box. The Settings button under Jupyter is highlighted.'} | ||
ottrpal::include_slide("https://docs.google.com/presentation/d/1-IU5l40UxmpoBqFimSUmT1PNEUij2UnXMslOsiG5ncE/edit#slide=id.g14ea2db115d_0_18") | ||
``` | ||
|
||
1. You will see some configuration options for the Jupyter cloud environment, and a list of costs because it costs a small amount of money to use cloud computing. | ||
|
||
```{r, echo=FALSE, fig.alt='Screenshot of the Jupyter Cloud Environment dialogue box. The cost to run the environment is highlighted.'} | ||
ottrpal::include_slide("https://docs.google.com/presentation/d/1-IU5l40UxmpoBqFimSUmT1PNEUij2UnXMslOsiG5ncE/edit#slide=id.g25442045568_0_0") | ||
``` | ||
|
||
```{r, include=FALSE} | ||
# settings for instructions about using the default Jupyter configuration | ||
# default settings | ||
AnVIL_module_settings$include <- TRUE | ||
AnVIL_module_settings$text <- '1. Configure any settings you need for your cloud environment. If you are uncertain about what you need, the default configuration is a reasonable, cost-conservative choice. It is fairly easy to increase your compute resources later, if needed, but harder to scale down. Scroll down and click the "CREATE" button when you are satisfied with your setup.' | ||
# for students - exclude this, they get more specific instructions below | ||
if (AnVIL_module_settings$audience == "student") { | ||
AnVIL_module_settings$include <- FALSE | ||
} | ||
``` | ||
|
||
```{r, echo=FALSE, results='asis', eval=AnVIL_module_settings$include} | ||
cat(AnVIL_module_settings$text) | ||
``` | ||
|
||
```{r, echo=FALSE, eval=AnVIL_module_settings$include, fig.alt='Screenshot of the Jupyter Cloud Environment dialogue box. The "CREATE" button is highlighted.'} | ||
ottrpal::include_slide("https://docs.google.com/presentation/d/1-IU5l40UxmpoBqFimSUmT1PNEUij2UnXMslOsiG5ncE/edit#slide=id.g14ea2db115d_0_41") | ||
``` | ||
|
||
```{r, include=FALSE} | ||
# settings for instructions about using a custom docker image | ||
# default settings | ||
AnVIL_module_settings$include <- FALSE | ||
AnVIL_module_settings$text <- NULL | ||
# for students | ||
if (AnVIL_module_settings$audience == "student") { | ||
# if there is a custom docker image, include these instructions | ||
if ( !is.null(AnVIL_module_settings$docker_image) ) { | ||
AnVIL_module_settings$include <- TRUE | ||
AnVIL_module_settings$text <- '1. Under "Application configuration" you will see a dropdown menu. Choose "Custom Environment". Then copy the following link into "Container image" textbox:' | ||
} | ||
# otherwise exclude these instructions | ||
else { | ||
AnVIL_module_settings$include <- FALSE | ||
} | ||
} | ||
``` | ||
|
||
```{r, echo=FALSE, results='asis', eval=AnVIL_module_settings$include} | ||
cat(AnVIL_module_settings$text) | ||
``` | ||
|
||
```{r, echo=FALSE, results='asis', eval=AnVIL_module_settings$include} | ||
cat(paste("`", AnVIL_module_settings$docker_image, "`")) | ||
``` | ||
|
||
```{r, echo=FALSE, eval=AnVIL_module_settings$include, fig.alt='Screenshot of the Jupyter Cloud Environment "Application configuration" dropdown. The option "Custom Environment" is highlighted.'} | ||
ottrpal::include_slide("https://docs.google.com/presentation/d/1-IU5l40UxmpoBqFimSUmT1PNEUij2UnXMslOsiG5ncE/edit#slide=id.g25442045568_0_8") | ||
``` | ||
|
||
```{r, echo=FALSE, eval=AnVIL_module_settings$include, fig.alt='Screenshot of the Jupyter Cloud Environment dialog box. "Custom Environment" has been selected in the "Application configuration" dropdown menu, and the "Container image" textbox is highlighted.'} | ||
ottrpal::include_slide("https://docs.google.com/presentation/d/1-IU5l40UxmpoBqFimSUmT1PNEUij2UnXMslOsiG5ncE/edit#slide=id.g25442045568_0_14") | ||
``` | ||
|
||
```{r, include=FALSE} | ||
# settings for instructions about using a custom startup script | ||
# default settings | ||
AnVIL_module_settings$include <- FALSE | ||
AnVIL_module_settings$text <- NULL | ||
# for students | ||
if (AnVIL_module_settings$audience == "student") { | ||
# if there is a custom docker image, include this slide | ||
if ( !is.null(AnVIL_module_settings$startup_script) ) { | ||
AnVIL_module_settings$include <- TRUE | ||
AnVIL_module_settings$text <- '1. Under "Startup script" you will see textbox. Copy the following link into the box:' | ||
} | ||
# otherwise exclude this slide | ||
else { | ||
AnVIL_module_settings$include <- FALSE | ||
} | ||
} | ||
``` | ||
|
||
```{r, echo=FALSE, results='asis', eval=AnVIL_module_settings$include} | ||
cat(AnVIL_module_settings$text) | ||
``` | ||
|
||
```{r, echo=FALSE, results='asis', eval=AnVIL_module_settings$include} | ||
cat(paste("`", AnVIL_module_settings$startup_script, "`")) | ||
``` | ||
|
||
```{r, echo=FALSE, eval=AnVIL_module_settings$include, fig.alt='Screenshot of the Jupyter Cloud Environment customization dialogue box. The textbox labeled "Startup script" is highlighted.'} | ||
ottrpal::include_slide("https://docs.google.com/presentation/d/1-IU5l40UxmpoBqFimSUmT1PNEUij2UnXMslOsiG5ncE/edit#slide=id.g25442045568_0_48") | ||
``` | ||
|
||
```{r, include=FALSE} | ||
# student instructions to click "Create" | ||
# default settings (non-students get different instructions) | ||
AnVIL_module_settings$include <- FALSE | ||
AnVIL_module_settings$text <- NULL | ||
# for students | ||
if (AnVIL_module_settings$audience == "student") { | ||
AnVIL_module_settings$include <- TRUE | ||
AnVIL_module_settings$text <- '1. Leave everything else as-is. To create your Jupyter Cloud Environment, scroll down and click the "CREATE" button.' | ||
} | ||
``` | ||
|
||
```{r, echo=FALSE, results='asis', eval=AnVIL_module_settings$include} | ||
cat(AnVIL_module_settings$text) | ||
``` | ||
|
||
```{r, echo=FALSE, eval=AnVIL_module_settings$include, fig.alt='Screenshot of the Jupyter Cloud Environment dialogue box. The "CREATE" button is highlighted.'} | ||
ottrpal::include_slide("https://docs.google.com/presentation/d/1-IU5l40UxmpoBqFimSUmT1PNEUij2UnXMslOsiG5ncE/edit#slide=id.g14ea2db115d_0_41") | ||
``` | ||
|
||
1. The dialogue box will close and you will be returned to your Workspace. You can see the status of your cloud environment by hovering over the Jupyter icon. It will take a few minutes for Terra to request computers and install software. | ||
|
||
```{r, echo=FALSE, fig.alt='Screenshot of a Terra Workspace. The hovertext for the Jupyter icon is highlighted, and indicates that the status of the environment is "Creating".'} | ||
ottrpal::include_slide("https://docs.google.com/presentation/d/1-IU5l40UxmpoBqFimSUmT1PNEUij2UnXMslOsiG5ncE/edit#slide=id.g25442045568_0_60") | ||
``` | ||
|
||
1. When your environment is ready, its status will change to "Running". Click on the "ANALYSES" tab to create or open a Jupyter Notebook. | ||
|
||
```{r, echo=FALSE, fig.alt='Screenshot of a Terra Workspace. The hovertext for the Jupyter icon is highlighted, and indicates that the status of the environment is "Running". The ANALYSES tab is also highlighted'} | ||
ottrpal::include_slide("https://docs.google.com/presentation/d/1-IU5l40UxmpoBqFimSUmT1PNEUij2UnXMslOsiG5ncE/edit#slide=id.g25442045568_0_66") | ||
``` | ||
|
||
1. From the ANALYSES tab, you can click on the name of an existing Jupyter Notebook to view and launch it, or click the "START" button to create a new Notebook. | ||
|
||
```{r, echo=FALSE, fig.alt='Screenshot of Terra Workspace with the "ANALYSES" tab selected and highlighted. The page shows a list of Jupyter Notebooks. The Notebook names and the START button are highlighted.'} | ||
ottrpal::include_slide("https://docs.google.com/presentation/d/1-IU5l40UxmpoBqFimSUmT1PNEUij2UnXMslOsiG5ncE/edit#slide=id.g25442045568_0_73") | ||
``` | ||
|
||
```{r, include=FALSE} | ||
# settings for instructions about opening a Jupyter Notebook | ||
# default settings | ||
AnVIL_module_settings$include <- TRUE | ||
AnVIL_module_settings$text <- '1. Clicking on a Notebook name will open a static preview of the Notebook. To edit and run the Notebook, click the "OPEN" button.' | ||
# for students - exclude this, they may not be launching a Notebook right away. Individual books / courses can give more specific instructions about which Notebook to open and when to open it. | ||
if (AnVIL_module_settings$audience == "student") { | ||
AnVIL_module_settings$include <- FALSE | ||
} | ||
``` | ||
|
||
```{r, echo=FALSE, results='asis', eval=AnVIL_module_settings$include} | ||
cat(AnVIL_module_settings$text) | ||
``` | ||
|
||
```{r, echo=FALSE, eval=AnVIL_module_settings$include, fig.alt='Screenshot of a preview of a Jupyter Notebook in a Terra Workspace. The "OPEN" button is highlighted.'} | ||
ottrpal::include_slide("https://docs.google.com/presentation/d/1-IU5l40UxmpoBqFimSUmT1PNEUij2UnXMslOsiG5ncE/edit#slide=id.g25442045568_0_82") | ||
``` | ||
|
||
```{r, include = FALSE} | ||
AnVIL_module_settings <<- NULL | ||
``` |
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