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 goes through two ways to standardize a custom environment: with a custom Docker image or a startup script.
You want to ensure all colleagues are using the exact same software and computational environment, even if If you can't use one of the pre-configured application environments. You can do this - and make sure everyone gets the same analysis results - by using the same Docker image or startup script.
Why use pre-installed software and dependencies?If your analysis requires software packages that are not part of the default or pre-configured 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 exactly what version of programming languages and packages to include. 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 that you can also use a custom environment to revert to a previous version of the pre-configured environments.
Standardizing a custom environment: Step-by-step instructions
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>.
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 VM resource allocations.
For more detail, check out this tutorial, Using a startup script to launch a pre-configured Cloud Environment. There, you can learn about creating your own startup script, uploading it to a Google bucket, and using it to launch a custom cloud environment.