Added guides to environment management - #8
Conversation
✅ Deploy Preview for earthscope-geolab-docs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
sarahw-earthscope
left a comment
There was a problem hiding this comment.
The content of the new pages is fantastic!
The organization of the whole section now feels chaotic, however. What started as a single page of bullet-summary followed by expanded details for each option, now just feels super redundant with those more detailed options linking out to more pages. I'd love to see one overhead page with a brief summary of the different installation options (this should help users differentiate their use case), and then link to the sub-page for the guide on each one.
| @@ -0,0 +1,159 @@ | |||
| # Creating Your Own Python Environment in GeoLab | |||
|
|
|||
| Python projects rely on add-on packages, which are collections of code that do useful things like process data, make maps, or analyze signals. Different projects often need different packages, or even different versions of the same package. An **environment** is a way to keep all of that organized in one tidy, self-contained workspace. | |||
There was a problem hiding this comment.
Add a clarification that they are already inside a conda environment when they launch GeoLab.
| conda env create -f environment.yml | ||
| ``` | ||
|
|
||
| Conda will figure out which versions of everything are compatible and download them. This can take a few minutes, which is normal. |
There was a problem hiding this comment.
We need to add clarification here that these things are getting installed in a NEW environment that doesn't include everything in the geolab-base. Their environment.yml needs to include all the packages they want to install, not just the ones that were missing from base.
|
|
||
| 1. Open a notebook and go to **Kernel > Change Kernel…** | ||
|
|
||
|  |
There was a problem hiding this comment.
images aren't rendering in the build preview, make sure they are included in the MR
| @@ -7,6 +7,8 @@ When you open GeoLab and select an environment when starting your server, you la | |||
| * [Bring Your Own Image:](#bring-your-own-image) Many other organizations (e.g, NASA, NOAA) maintain their own JupyterHub compute environment images. Many of these will run in GeoLab. | |||
There was a problem hiding this comment.
Add a list item for binder
| ## Create a Custom Image | ||
| :::{attention} Section Under Development! | ||
| ::: | ||
| You can build a custom own image using our existing image as a template. This strategy is an advanced approach for software with complex installations, and only recommended for users with some prior knowledge of building containers. |
There was a problem hiding this comment.
These summaries now feel redundant with the summary bullets above and the details on a separate page.
| [2i2c guide to binderhub](https://docs.2i2c.org/user/environment/dynamic-imagebuilding/#user-environment-building) - This strategy is an option if you want to use an environment file that extends the base GeoLab image with additional python packages, but don't want to build and host an image. You can specify your environment file once to generate a stable container, and load that at launch time. Note, there's a 15-20 minute overhead to build the image in GeoLab the first time and any time you change the environment file, you will need to consider whether this will save you time in the long run. | ||
|
|
||
| - If you need to make extensive software changes, you can build your own image using our existing image as a template. Instructions are located in the `README.md` file in the [GeoLab GitHub repository.]({{ geolab_github }}) You will need to clone the repository, modify the build files to suit your needs, build your container and upload it to a public container registry like DockerHub or AWS ECR, and then select it as 'Other' from the dropdown when you [launch your GeoLab server](../getting_started/server_launch.md). This strategy is an advanced approach for software with complex installations, and only recommended for users with some prior knowledge of building docker containers. | ||
| Follow the instructions to deploy a custom image from a GitHub repository using binder in this [guide](./environments/binder_for_images.md). |
There was a problem hiding this comment.
It's confusing to have two links here (one to 2i2c, one to our guide), users won't know which one to follow. I'd suggest linking to our guide, and then at the end of that, add "see the 2i2c guide for additional details"
There was a problem hiding this comment.
Please see notes linked in the jira ticket for suggested improvements to make this easier for first-time image builders to follow.
sarahw-earthscope
left a comment
There was a problem hiding this comment.
See notes linked in the jira ticket for suggested improvements to make this easier for first-time image builders to follow.
sarahw-earthscope
left a comment
There was a problem hiding this comment.
Content looks really good, just a few suggestions on reorganizing some pieces to make the forks more apparent to new users.
| %pip install pkgname | ||
| ``` | ||
|
|
||
| For more information about managing environments, go to [`Managing Environments`](./managing_environments.md) for detailed instructions. |
There was a problem hiding this comment.
The link text should match the title of the target page. It's very confusing that the page titled 'Managing Environments' (this one) is not the one named managing_environments.md , and that page is named something else.
|
|
||
| While this is the simplest method for building and running a custom image, GeoLab builds the image every time. The build process can take some time and is not ideal for multiple users. By contrast, an image in a repository is pulled directly into JupyterHub and started without waiting for it to be built. | ||
|
|
||
| For more information about using Binder, go to [`Binder for Images`](./binder_for_images.md) for detailed instructions on building a repository that works with Binder. |
There was a problem hiding this comment.
Same here, please make sure the link text matches the page title
|
|
||
| --- | ||
|
|
||
| ## Installing a Package Without Rebuilding |
There was a problem hiding this comment.
'build' has another meaning in this section re: images, can we re-title this something like "Installing a package in the current environment" ?
|
|
||
| Think of an **image** as a recipe and a **container** as a meal made from that recipe. The recipe doesn't change; you can make the same meal over and over. GeoLab does the same thing: it takes your image and launches a fresh session from it every time. | ||
|
|
||
| Install Python packages in an image by editing plaintext files that list the required software. A tool called `Docker` reads those files and builds the image. The image must be published in an image repository so GeoLab can access it. Here is the process: |
There was a problem hiding this comment.
Add a sentence or two about non-python packages.
| Install Python packages in an image by editing plaintext files that list the required software. A tool called `Docker` reads those files and builds the image. The image must be published in an image repository so GeoLab can access it. Here is the process: | ||
|
|
||
| ```text | ||
| Edit config files → Docker builds → Image → Push image to repository → GeoLab runs it |
There was a problem hiding this comment.
This shows up as a line of code with a scroll bar depending on window width. An ordered list or a table might be a better display option.
|
|
||
| --- | ||
|
|
||
| ## Amazon Web Services Public Elastic Container Registry (ECR) |
There was a problem hiding this comment.
This should either be a separate page, OR needs a section link from the top of the page to jump straight to here without scrolling through all the GHCR instructions
|
|
||
| ### Getting Public ECR Credentials | ||
|
|
||
| Authenticate Docker to a public ECR registry. Use the `ecr-public` command, and note that the region **must** be `us-east-1`: |
There was a problem hiding this comment.
| Authenticate Docker to a public ECR registry. Use the `ecr-public` command, and note that the region **must** be `us-east-1`: | |
| Authenticate Docker to a public ECR registry. Use the `ecr-public` command, and note that the region **must** be `us-east-1` for authentication, regardless of the region you regularly work in. |
| @@ -0,0 +1,182 @@ | |||
| # GeoLab Binder | |||
|
|
|||
| There are two ways to launch a custom environment in GeoLab. The first is to build a Docker image, push it to a registry, and paste the image URL. The second, called **GeoLab Binder**, is to point GeoLab at a GitHub repository and let it build the environment for you. This guide covers how the second approach works and when to use it. | |||
There was a problem hiding this comment.
| There are two ways to launch a custom environment in GeoLab. The first is to build a Docker image, push it to a registry, and paste the image URL. The second, called **GeoLab Binder**, is to point GeoLab at a GitHub repository and let it build the environment for you. This guide covers how the second approach works and when to use it. | |
| There are two ways to launch a custom environment in GeoLab. The first is to [Build a custom image](custom_image_page.md) and push it to a registry, and specify the image URL when launching GeoLab. The second, called **GeoLab Binder**, is to point GeoLab at a GitHub repository and let it build the environment for you. This guide covers how the second approach works and when to use it. |
| Both approaches run inside GeoLab, so you have the same access to EarthScope data services either way. | ||
|
|
||
| ```text | ||
| GitHub repo with config files → GeoLab builds image → Session launches in GeoLab |
There was a problem hiding this comment.
Consider reformatting this to a numbered list or table or flow-charty-graphic, instead of single-line text scroll
|
|
||
| --- | ||
|
|
||
| ## GeoLab Binder vs. Custom Image |
There was a problem hiding this comment.
I think this context and table might belong on the environment management index page to help someone choose the right fork before diving into the build instructions. It doesn't hurt to reiterate here to help someone confirm they're in the right place... but they need this information before diving into a custome image build, too.
added binder_for_images.md, building_custom_images.md, and managing_environments.md