Skip to content

Commit

Permalink
copy over 2023 files
Browse files Browse the repository at this point in the history
  • Loading branch information
egagli committed Dec 28, 2023
1 parent e5cdcc7 commit b86bdee
Show file tree
Hide file tree
Showing 10 changed files with 487 additions and 69 deletions.
1 change: 0 additions & 1 deletion .env

This file was deleted.

21 changes: 6 additions & 15 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,24 +8,21 @@ on:
- 'README.md'
- '.gitignore'

env:
DOCKER_IMAGE: "uwgda/uwgda-image-2023"

jobs:
build-image-and-push:
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v2

- name: Set Docker Image Name Environment Variable
run: cat .env >> $GITHUB_ENV
uses: actions/checkout@v3

- name: Get CalenderVersion UTC Date
id: calver
run: echo "::set-output name=version::$(date +'%Y.%m.%d')"

- name: Build and Push to DockerHub
env:
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
if: env.DOCKER_PASSWORD != ''
uses: jupyterhub/repo2docker-action@master
with:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
Expand All @@ -34,9 +31,6 @@ jobs:
ADDITIONAL_TAG: ${{ steps.calver.outputs.version }}

- name: Also Push To quay.io
env:
QUAY_PASSWORD: ${{ secrets.QUAY_PASSWORD }}
if: env.QUAY_PASSWORD != ''
id: push-to-quay
uses: redhat-actions/push-to-registry@v2
with:
Expand All @@ -46,11 +40,8 @@ jobs:
username: ${{ secrets.QUAY_USERNAME }}
password: ${{ secrets.QUAY_PASSWORD }}

- name: Print image url
run: echo "Image pushed to ${{ steps.push-to-quay.outputs.registry-paths }}"

- name: Report Image Size and Conda Packages
if: always()
run: |
docker images
docker run ${{ env.DOCKER_IMAGE }}:latest conda list --export
docker run ${{env.DOCKER_IMAGE}}:latest conda list --export
10 changes: 5 additions & 5 deletions .github/workflows/PR.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ on:
- 'README.md'
- '.gitignore'

env:
DOCKER_IMAGE: "uwgda/uwgda-image-2023"

jobs:
build-image-without-pushing:
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
steps:
- name: Checkout PR
uses: actions/checkout@v2

- name: Set Docker Image Name Environment Variable
run: cat .env >> $GITHUB_ENV
uses: actions/checkout@v3

- name: Build Only
uses: jupyterhub/repo2docker-action@master
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/PRbadge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ on:

jobs:
build-image-without-pushing:
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
steps:
- name: Checkout PR
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Comment on PR with Binder link
uses: actions/github-script@v3
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/Rebuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ on:

jobs:
trigger-build:
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Get CalenderVersion UTC Date
id: calver
Expand All @@ -23,7 +23,7 @@ jobs:
- name: Update lockfile
run: |
sed -i "1s/.*/#REBUILD/" conda-linux-64.lock
# https://github.com/peter-evans/create-pull-request/blob/main/docs/concepts-guidelines.md#triggering-further-workflow-runs
- name: Create Pull Request
uses: peter-evans/create-pull-request@v3
Expand Down
42 changes: 5 additions & 37 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,45 +1,13 @@
# docker-template
# UWGDA2021 JupyterHub Image
This repository builds a [JupyterHub](https://jupyter.org/hub) environment with Repo2Docker [GitHub Actions CI](https://github.com/jupyterhub/repo2docker-action)

[![Action Status](https://github.com/uwhackweek/docker-template/workflows/CI/badge.svg)](https://github.com/uwhackweek/docker-template/actions)
[![Docker Pulls](https://img.shields.io/docker/pulls/uwhackweeks/template)](https://hub.docker.com/r/uwhackweeks/template/tags)
[![BinderHub](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/uwhackweek/docker-template/main?urlpath=git-pull?repo=https://github.com/uwhackweek/jupyterbook-template%26amp%3Bbranch=main%26amp%3Burlpath=lab)
[![CI](https://github.com/UW-GDA/uwgda-image-2023/actions/workflows/CI.yml/badge.svg)](https://github.com/UW-GDA/uwgda-image-2023/actions/workflows/CI.yml)

### How to use this template repository

1. Click 'Use this Template' to create a copy of the configuration under your organization
2. Edit README.md
2. Edit `.env` and `docker-compose.yml` with your container storage `org/repository`
3. Ensure you have [GitHub Secrets](https://docs.github.com/en/actions/reference/encrypted-secrets) for DOCKER_USERNAME and DOCKER_PASSWORD
4. Build with GitHub Actions simply by pushing to GitHub:
* Commits to 'main' branch build image, by git commit sha and 'latest', and push to DockerHub and Quay.io
* Pull Requests trigger image building without pushing to DockerHub
Image Versions Hosted on DockerHub https://hub.docker.com/repository/docker/uwgda/uwgda-image-2023

```bash
git clone https://github.com/uwhackweek/docker-template
cd docker-template
git checkout dev
# make sure dev branch is up-to-date with master
git merge master
# modify environment.yml or other files in binder/
git commit -a -m "modified binder/environment to my liking"
git push
# go to github.com and create a pull request to merge dev changes into master
```

### Pull your image to run a local JupyterLab session

```bash
Run locally with [Docker](https://docs.docker.com/get-docker/)
```
docker compose up
# Do things in JupyterLab w/ files in local directory
docker compose down
```

### Pull image from respository

* From [DockerHub](https://hub.docker.com/r/uwhackweeks/template/tags): `docker pull uwhackweek/template:latest`
* From [Quay](https://quay.io/repository/uwhackweek/template?tab=tags): `docker pull quay.io/uwhackweek/template:latest`

### Point to a specific tagged image in JupyterHub config

https://zero-to-jupyterhub.readthedocs.io/en/latest/reference/reference.html?highlight=profile_list#singleuser-profilelist
4 changes: 4 additions & 0 deletions apt.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
vim
emacs
nano
wget
man
manpages
git
Loading

0 comments on commit b86bdee

Please sign in to comment.