Skip to content

Commit ca40c99

Browse files
committed
simplified environment, updated readme
1 parent 0f1bb7b commit ca40c99

File tree

3 files changed

+13
-17
lines changed

3 files changed

+13
-17
lines changed

README.md

+13-10
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,36 @@
11
# repo2docker-githubci
2-
a template for building jupyterhub-compatible docker images with repo2docker and github actions
2+
a template for building [JupyterHub](https://jupyter.org/hub) environments with [Repo2Docker](https://repo2docker.readthedocs.io/en/latest/) and [GitHub Actions CI](https://help.github.com/en/actions/automating-your-workflow-with-github-actions)
33

44
![Action Status](https://github.com/scottyhq/repo2docker-githubci/workflows/Repo2Docker/badge.svg)
5+
![Docker Pulls](https://img.shields.io/docker/pulls/scottyhq/repo2docker-githubci)
6+
[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/scottyhq/repo2docker-githubci/master?urlpath=lab)
57

6-
### how to use
8+
### How to use
79

8-
1) click the "Use this template" button to create a repo copy
10+
1) click the "Use this template" button to create your own repo
911

10-
1) create dockerhub account that matches your github username
12+
1) create DockerHub account that matches your GitHub username
1113
(could make this configurable)
1214
For example: https://hub.docker.com/u/scottyhq
1315

1416
1) add DOCKER_USERNAME and DOCKER_PASSWORD to repo encrypyted secrets
1517
https://help.github.com/en/actions/automating-your-workflow-with-github-actions/creating-and-using-encrypted-secrets
1618

17-
1) build with GitHub Action
19+
1) modify readme links and any files in the `binder/` folder
20+
21+
1) build with GitHub Actions by pushing to GitHub
1822
* commits to master branch trigger re-building image tagged by github short sha and 'latest'
1923
```
2024
git commit -a -m "modified binder/environment to my liking"
2125
git push
2226
```
2327
* pushing a tag results in a docker image with the same tag:
2428
```
25-
git tag -am "test v2.3.2" v2.3.2
29+
git tag -am "tagging 2.3.2" 2.3.2
2630
git push --tags
2731
```
2832

29-
### grab your image to run locally
33+
### Pull your image to run a local JupyterLab session
3034
```
3135
export IMAGE=scottyhq/repo2docker-github
3236
export TAG=latest
@@ -36,7 +40,6 @@ docker stop repo2docker
3640
docker rm repo2docker
3741
```
3842

39-
### or run on a binderhub
40-
Just point to the image in a seperate repo containing notebooks you want to run:
43+
### Run your image on a BinderHub
44+
Now that you have images on DockerHub, you can re-use them in many ways. For example, create a BinderHub compatible content repository with 'binder' branch that points to a specific image. All your notebooks and scripts can be in the 'master' branch, and are pulled into a BinderHub session with [nbgitpuller](https://github.com/jupyterhub/nbgitpuller). Structuring things this way means that changes to your scripts won't trigger rebuilding large images:
4145
https://github.com/scottyhq/githubci-binder-example
42-

binder/environment.yml

-2
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,7 @@ dependencies:
99
- nbgitpuller=0.7
1010
- dask=2.8
1111
- distributed=2.8
12-
- dask-kubernetes=0.10
1312
- dask-labextension=1.0
14-
- dask-gateway=0.5
1513
- tornado=6.0
1614
- bokeh=1.4
1715
- python-graphviz=0.13

binder/postBuild.txt

-5
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,3 @@ jupyter labextension install dask-labextension \
66
@jupyter-widgets/jupyterlab-manager
77

88

9-
# dask config
10-
# ${KERNEL_PYTHON_PREFIX} is set by repo2docker to sys.prefix
11-
# of the python that the kernel is run in.
12-
mkdir -p ${KERNEL_PYTHON_PREFIX}/etc/dask
13-
cp binder/dask_config.yaml ${KERNEL_PYTHON_PREFIX}/etc/dask/dask.yaml

0 commit comments

Comments
 (0)