To make sure everyone in your group is using the same software in your Jupyter or RStudio analysis, you can use a custom Docker Image or a startup script to standardize a custom environment. This article details two ways to standardize a custom environment: with a custom Docker image or a startup script.
Overview: Why standardize your custom cloud environment
You want to ensure all colleagues are using the exact same software and computational environment, even if you can't use a preconfigured application environment. You can do this - and make sure everyone gets the same analysis results - by using the same Docker image or startup script.
Why use preinstalled software and dependencies?If your analysis requires software packages that are not part of the default or preconfigured configurations, you could start your interactive application by installing the ones you need on the Persistent Disk. However, this approach can turn into a maintenance headache if you have multiple notebooks that require the same configuration commands. Here are three reasons to move some of those software installation steps into the application configuration proper.
You don't have to spend time (and $$) running setup code to install what's needed for your analysis every time you create a new Jupyter Cloud Environment.
Customizing the application configuration simplifies and standardizes the setup needed to run an application.
Custom Docker containers and startup scripts put you in control of your chosen version of programming languages and packages. Recording the image URL within the notebook you wish to share is a quick and easy way to spin up and share an identical environment, ensuring that colleagues get the same results.
To learn more about developing and using custom Docker images in Terra, see these articles on working with containers/Docker. Note: You can also use a custom environment to revert to a previous version of the preconfigured environments.
Instructions to standardize a custom environment
Set a custom environment with a Custom Docker Image
1. Select Custom Environment from the Application Configuration drop-down menu.
2. Input the container image, using the format <image name>:<tag>.
Note: Custom environments must be based on one of the Terra Jupyter Notebook base images or a project-specific image.
Set a custom environment with a startup script
1. Scroll down to the Cloud compute profile box in the Jupyter Cloud Environment customization pane. This is where to modify the virtual machine (VM) resource allocations.
2. Input the path to the startup script in the field where it says URI (for Uniform Resource Identifier, a close cousin of URL, the Uniform Resource Locator).
For more detail, see this tutorial, Using a startup script to launch a preconfigured Cloud Environment. Learn about creating your own startup script, uploading it to a Google bucket, and using it to launch a custom Cloud Environment.
Please sign in to leave a comment.