You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+27-24Lines changed: 27 additions & 24 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@ This repo provides docker images for running jupyter notebook in [Terra](https:/
5
5
Make sure to go through the [contributing guide](https://github.com/DataBiosphere/terra-docker/blob/master/CONTRIBUTING.md#contributing) as you make changes to this repo.
@@ -20,15 +20,18 @@ Make sure to go through the [contributing guide](https://github.com/DataBiospher
20
20
# How to create your own Custom image to use with notebooks on Terra
21
21
Custom docker images need to use a Terra base image (see above) in order to work with the service that runs notebooks on Terra.
22
22
* You can use any of the base images above
23
-
* Here is an example of how to build off of a base image: Add `FROM us.gcr.io/broad-dsp-gcr-public/terra-jupyter-base:0.0.1` to your dockerfile (`terra-jupyter-base` is the smallest image you can extend from)
23
+
*`terra-base` is the smallest image, but doesn't include any scientific packages on top of Jupyter and R
24
+
* Here is an example of how to build off of a base image: Add `FROM us.gcr.io/broad-dsp-gcr-public/terra-base:0.0.1` to your dockerfile
24
25
* Customize your image (see the [terra-jupyter-python](terra-jupyter-python/Dockerfile) dockerfile for an example of how to extend from one of our base images
25
-
* Publish the image to either GCR or Dockerhub; the image must be public to be used
26
+
* Publish the image to either GAR or Dockerhub;
27
+
* If using Dockerhub, the image **must be public** to be used
26
28
* Use the published container image location when creating notebook runtime
* Since 6/28/2021, we introduced a few changes that might impact building custom images
30
-
- Home directory of new images will be `/home/jupyter`. This means if your dockerfile is referencing `/home/jupyter-user` directory, you need to update it to $HOME (recommended) or `/home/jupyter`.
31
-
- Creating VMs with custom images will take much longer than terra supported images because `docker pull` will take a few min. If the custom image ends up being too large, VM creation may time out. New base images are much larger in size than previous versions.
30
+
* GAR image example: us.gcr.io/repository/[image name]:[tag]
31
+
* Some things to keep in mind when creating custom images:
32
+
- The home directory of new images will be `/home/jupyter`. This means if your dockerfile is referencing the `/home/jupyter-user` directory, you need to update it to $HOME (recommended) or `/home/jupyter`.
33
+
- Creating VMs with custom images may take longer than terra supported images because `docker pull` will take a few min. If the custom image ends up being too large, VM creation may time out.
34
+
-
32
35
33
36
# Development
34
37
## Using git secrets
@@ -56,25 +59,25 @@ Once you have the container running, you should be able to access jupyter at htt
56
59
Detailed documentation on how to integrate the terra-docker image with Leonardo can be found [here](https://broadworkbench.atlassian.net/wiki/spaces/IA/pages/2519564289/Integrating+new+Terra+docker+images+with+Leonardo)
57
60
58
61
### If you are adding a new image:
59
-
- Create a new directory with the Dockerfile and a CHANGELOG.md.
62
+
- Create a new directory with the Dockerfile and a CHANGELOG.md.
60
63
- Add the directory name (also referred to as the image name) as an entry to the image_data array in the file in config/conf.json. For more info on what is needed for a new image, see the section on the config
61
64
- If you wish the image to be baked into our custom image, which makes the runtime load significantly faster (recommended), make a PR into the leonardo [repo](https://github.com/DataBiosphere/leonardo) doing the following within the `jenkins` folder:
62
-
- Add the image to the parameter list in the Jenkinsfile
63
-
- Update the relevant `prepare` script in each subdirectory. Currently there is a prepare script for gce and dataproc.
64
-
- It is recommended to add a test in the `automation` directory (`automation/src/test/resources/reference.conf`)
65
-
- Add your image to the `reference.conf` in the automation directory. This will be the only place any future version updates to your image happen. This ensures, along with the test in the previous step, that any changes to the image are tested.
66
-
- Run the GHA to generate the image, and add it to `reference.conf` in the http directory (`http/src/main/resources/reference.conf`)
65
+
- Add the image to the parameter list in the Jenkinsfile
66
+
- Update the relevant `prepare` script in each subdirectory. Currently there is a prepare script for gce and dataproc.
67
+
- It is recommended to add a test in the `automation` directory (`automation/src/test/resources/reference.conf`)
68
+
- Add your image to the `reference.conf` in the automation directory. This will be the only place any future version updates to your image happen. This ensures, along with the test in the previous step, that any changes to the image are tested.
69
+
- Run the GHA to generate the image, and add it to `reference.conf` in the http directory (`http/src/main/resources/reference.conf`)
67
70
68
71
### If you are updating an existing image:
69
72
-[Create your terra-docker PR](https://broadworkbench.atlassian.net/wiki/spaces/IA/pages/2519564289/Integrating+new+Terra+docker+images+with+Leonardo#1.-Create-a-terra-docker-PR)
70
-
- Update the version in config/conf.json
71
-
- Update CHANGELOG.md and VERSION file
72
-
- Ensure that no `From` statements need to be updated based on the image you updated (i.e., if you update the base image, you will need to update several other images)
73
-
- Run updateVersions.sc to bump all images dependent on the base
73
+
- Update the version in config/conf.json
74
+
- Update CHANGELOG.md and VERSION file
75
+
- Ensure that no `From` statements need to be updated based on the image you updated (i.e., if you update the base image, you will need to update several other images)
76
+
- Run updateVersions.sc to bump all images dependent on the base
74
77
-[Merge your terra-docker PR and check if the image(s) and version json files are created](https://broadworkbench.atlassian.net/wiki/spaces/IA/pages/2519564289/Integrating+new+Terra+docker+images+with+Leonardo#2.-Merge-your-terra-docker-PR-and-check-images-are-created)
75
78
-[Open a PR in leonardo](https://broadworkbench.atlassian.net/wiki/spaces/IA/pages/2519564289/Integrating+new+Terra+docker+images+with+Leonardo#3.-Create-a-new-leo-PR-that-integrates-the-new-images)
76
-
- Update the relevant `prepare` script within the `jenkins` folder
77
-
- Update the automation `reference.conf` file
79
+
- Update the relevant `prepare` script within the `jenkins` folder
80
+
- Update the automation `reference.conf` file
78
81
-[Run the GHA on your branch to generate the new image](https://broadworkbench.atlassian.net/wiki/spaces/IA/pages/2519564289/Integrating+new+Terra+docker+images+with+Leonardo#4.-Run-the-Github-Action-in-leo-to-generate-a-new-custom-COS-image)
79
82
-[Update the leonardo PR to use the newly generated image](https://broadworkbench.atlassian.net/wiki/spaces/IA/pages/2519564289/Integrating+new+Terra+docker+images+with+Leonardo#5.-Update-the-Leo-PR-to-use-the-generated-OS-images)
80
83
- Ensure that the `terra-docker-versions-candidate.json` file (which is what the UI sources the dropdown from) in the `terra-docjker-image-documentation-[env]` bucket correclty references your new docker image
@@ -85,11 +88,11 @@ Detailed documentation on how to integrate the terra-docker image with Leonardo
If you're on an M1 and building an image from a locally built image, replace the current FROM command:
91
94
92
-
`FROM --platform=linux/amd64 terra-jupyter-base`
95
+
`FROM --platform=linux/amd64 terra-base`
93
96
94
97
Apple Silicon chips later then M1 (ex. M3) need:
95
98
@@ -120,9 +123,9 @@ To launch an image through Terra, navigate to https://app.terra.bio or your BEE'
120
123
121
124
## Config
122
125
123
-
There is a config file located at `config/conf.json` that contains the configuration used by all automated jobs and build scripts that interface with this repo.
126
+
There is a config file located at `config/conf.json` that contains the configuration used by all automated jobs and build scripts that interface with this repo.
124
127
125
-
There is a field for "spark_version" top-level which must be updated if we update the debian version used in the custom image.
128
+
There is a field for "spark_version" top-level which must be updated if we update the debian version used in the custom image.
126
129
Currently it assumes 1.4x https://cloud.google.com/dataproc/docs/concepts/versioning/dataproc-release-1.4
127
130
128
131
There are some constants included, such as the tools supported by this repo. Of particular interest is the image_data array.
@@ -163,7 +166,7 @@ Each time you update or add an image, you will need to update the appropriate en
163
166
164
167
The scripts folder has scripts used for building.
165
168
-`generate_package_docs.py` This script is run once by build.sh each time an image is built. It is used to generate a .json with the versions for the packages in the image.
166
-
-`generate_version_docs.py` This script is run each time an image is built. It builds a new file master version file for the UI to look up the current versions to reference.
169
+
-`generate_version_docs.py` This script is run each time an image is built. It builds a new file master version file for the UI to look up the current versions to reference.
0 commit comments