Skip to content

Commit

Permalink
Merge pull request #1 from shaneknapp/trigger-image-build
Browse files Browse the repository at this point in the history
Fix data101 image, update readme/contributing
  • Loading branch information
shaneknapp authored Sep 5, 2024
2 parents 4c9e5df + ece5951 commit f702848
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 32 deletions.
20 changes: 20 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,26 @@ git checkout -b <branch name>
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:
Expand Down
21 changes: 21 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,24 @@
This is the repository for the data101 datahub and local user images.

See this repository's [CONTRIBUTING.md](https://github.com/berkeley-dsep-infra/data101-user-image/blob/main/CONTRIBUTING.md) for instructions. That information will eventually be migrated to docs.datahub.berkeley.edu.

# 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 `.`).
6 changes: 3 additions & 3 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,14 +61,14 @@ dependencies:
- pandocfilters==1.5.0
- pep8==1.7.1
- pgspecial==1.13.1
- pillow==9.2.0
- pillow==10.0.1 # sknapp 2024-09-05 had to unpin this version to fix build ==9.2.0
- plotly==5.13.1
- pooch==1.6.0
- prettytable==3.4.1
- pyarrow==9.0.0
- pypdf2==2.10.4
- pytables==3.7.0
- pytest==7.1.2
- pytest==8.3.2 # sknapp 2024-09-05 had to unpin this version to fix build ==7.1.2
- pytest-cov==3.0.0
- python-pdfkit==1.0.0
- requests==2.28.2
Expand All @@ -79,7 +79,7 @@ dependencies:
- sphinx-jupyterbook-latex==0.5.2
- sqlparse==0.4.3
- statsmodels==0.14.0
- sympy==1.10.1
- sympy==1.13.2 # sknapp 2024-09-05 had to unpin this version to fix build ==1.10.1
- tornado==6.2.0
- tqdm==4.64.0
- xarray==2023.5.0
Expand Down
29 changes: 0 additions & 29 deletions infra-requirements.txt

This file was deleted.

0 comments on commit f702848

Please sign in to comment.