From 445957ea7c43743445b8927d3c999dad9e36a5ce Mon Sep 17 00:00:00 2001 From: shane knapp Date: Thu, 5 Sep 2024 14:18:16 -0700 Subject: [PATCH] wordings --- CONTRIBUTING.md | 20 ++++++++++++++++++++ README.md | 6 +++--- 2 files changed, 23 insertions(+), 3 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 1ccf60b..8c32919 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -79,6 +79,26 @@ git checkout -b After you make your changes, you can use the following commands to see what's been modified and check out the diffs: `git status` and `git diff`. +### Building the image locally + +You should use [repo2-docker](https://repo2docker.readthedocs.io/en/latest/) to build and use/test the image on your own device before you push and create a PR. It's better (and typically faster) to do this first before using CI/CD. There's no need to waste Github Action minutes to test build images when you can do this on your own device! + +Run `repo2docker` from inside the cloned image repo. To run on a linux/WSL2 linux shell: +``` +repo2docker . # <--- the path to the repo +``` + +If you are using an ARM CPU (Apple M* silicon), you will need to run `jupyter-repo2docker` with the following arguments: + +``` +jupyter-repo2docker --user-id=1000 --user-name=jovyan \ + --Repo2Docker.platform=linux/amd64 \ + --target-repo-dir=/home/jovyan/.cache \ + -e PLAYWRIGHT_BROWSERS_PATH=/srv/conda \ + . # <--- the path to the repo +``` + +If you just want to see if the image builds, but not automatically launch the server, add `--no-run` to the arguments (before the final `.`). When you're ready to push these changes, first you'll need to stage them for a commit: diff --git a/README.md b/README.md index 2a994df..60b3844 100644 --- a/README.md +++ b/README.md @@ -6,9 +6,9 @@ See this repository's [CONTRIBUTING.md](https://github.com/berkeley-dsep-infra/d # building the image locally -You can use [repo2-docker](https://repo2docker.readthedocs.io/en/latest/) to build and use/test the image on your own device. +You should use [repo2-docker](https://repo2docker.readthedocs.io/en/latest/) to build and use/test the image on your own device before you push and create a PR. It's better (and typically faster) to do this first before using CI/CD. There's no need to waste Github Action minutes to test build images when you can do this on your own device! -launch `repo2docker` from inside the cloned image repo. To run on a linux/WSL2 linux shell: +Run `repo2docker` from inside the cloned image repo. To run on a linux/WSL2 linux shell: ``` repo2docker . # <--- the path to the repo ``` @@ -23,4 +23,4 @@ jupyter-repo2docker --user-id=1000 --user-name=jovyan \ . # <--- the path to the repo ``` -If you just want to see if the image builds, but not automatically launch a notebook, then add `--no-run` to the arguments (before the final `.`). +If you just want to see if the image builds, but not automatically launch the server, add `--no-run` to the arguments (before the final `.`).