Skip to content

Commit

Permalink
update environment
Browse files Browse the repository at this point in the history
  • Loading branch information
betolink committed Aug 2, 2023
1 parent abdaf75 commit af5b3dc
Show file tree
Hide file tree
Showing 8 changed files with 284 additions and 740 deletions.
51 changes: 17 additions & 34 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name: Build and push Docker image
on:
push:
tags:
- 'v*'
release:
types: [published]

jobs:
build-and-push-docker:
Expand All @@ -29,45 +29,28 @@ jobs:
run: |
SHA7="${GITHUB_SHA::7}"
DOCKER_TAG=$SHA7
echo $DOCKER_TAG > docker-tag.txt
echo "RELEASE_DATE=$(date +'%Y-%m-%d')" >> $GITHUB_ENV
echo "DOCKER_TAG=${DOCKER_TAG}" >> $GITHUB_ENV
- name: Upload docker tag
uses: actions/upload-artifact@v3
with:
name: docker-tag
path: docker-tag.txt
- name: "Set up QEMU"
uses: docker/setup-qemu-action@v2

- name: "Set up Docker Buildx"
uses: docker/setup-buildx-action@v2

- name: "Build and Publish to DockerHub"
uses: elgohr/[email protected]
- name: "Login to Docker Hub"
uses: docker/login-action@v2
with:
name: openscapes/python
username: openscapes
password: ${{ secrets.DOCKERHUB_TOKEN }}
workdir: ci
tags: "main, ${{env.DOCKER_TAG}}"

- name: "Build and push"
uses: docker/build-push-action@v4
with:
context: ci
push: true
tags: openscapes/python:latest, openscapes/python:${{ env.RELEASE_DATE }}

- name: Export Full Conda Environment
run: |
docker run openscapes/python:main conda list --export
update-hub-image:
runs-on: ubuntu-latest
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/v')
needs: build-and-push-docker
steps:
- name: get docker tag
uses: actions/download-artifact@v3
with:
name: docker-tag
- shell: bash
run: |
DOCKER_TAG=`cat docker-tag.txt`
echo "DOCKER_TAG=${DOCKER_TAG}" >> $GITHUB_ENV
- name: Push new image to hub
shell: bash
env:
JUPYTERHUB_TOKEN: ${{ secrets.HUB_TOKEN }}
run: |
echo $DOCKER_TAG
curl -Lv "https://staging.openscapes.2i2c.cloud/services/configurator/config" -X POST -H "Content-Type: application/json" -H "Authorization: token ${{env.JUPYTERHUB_TOKEN}}" --data '{"Spawner.default_url":"/lab","KubeSpawner.image":"openscapes/python:${{env.DOCKER_TAG}}"}'
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
## corn v2023.08.01

* using earthaccess v0.5.3
* pinned netcdf to 1.6.4 but still getting libnetcdf 1.9.2 via conda
* added quarto jupyterlab extension
* jupyter-resource-uage got updated to 1.0
* removing pangeo-notebook and using the Jupyter packages directly
* using official docker action to build and push image

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Jupyterhub base image for the [NASA Openscapes Hub](https://nasa-openscapes.github.io/2021-Cloud-Hackathon/)

![](https://img.shields.io/docker/image-size/openscapes/corn?sort=date)
<a href="https://hub.docker.com/repository/docker/openscapes/corn/tags?page=1&ordering=last_updated"><img src="https://img.shields.io/docker/v/openscapes/corn"></a>
<a href="https://hub.docker.com/repository/docker/openscapes/python/tags?page=1&ordering=last_updated"><img src="https://img.shields.io/docker/v/openscapes/python"></a>

## Overview

Expand Down
482 changes: 247 additions & 235 deletions ci/conda-linux-64.lock

Large diffs are not rendered by default.

462 changes: 0 additions & 462 deletions ci/conda-osx-64.lock

This file was deleted.

15 changes: 8 additions & 7 deletions ci/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,12 @@ channels:
- conda-forge
dependencies:
- python=3.9
- pangeo-notebook
- dask
- distributed
- rioxarray
- xarray>=2022.12
- h5netcdf
- netcdf4
- netcdf4=1.6.4
- h5py
- gdal~=3.6
- libgdal
Expand All @@ -34,25 +33,27 @@ dependencies:
- pydap
- lxml
- ipyleaflet
- dask-labextension
- jupyterlab>=4.0
- jupyter-server-proxy
- jupyterhub-singleuser
- jupyterlab-geojson
- jupyterlab-git
- jupyter-resource-usage
- jupyterlab-link-share
- jupyter-collaboration
- jupyterlab-h5web
- hdf5plugin
- ipympl
- conda-lock
- pooch
- earthaccess>=0.5.1
- earthaccess>=0.5.3
- rasterstats
- kerchunk
- rechunker
- pqdm
- coiled
- s3fs
- jinja2~=3.0.3
- nbgitpuller~=1.1.0
- nbgitpuller
- pip
platforms:
- linux-64
- osx-64
1 change: 1 addition & 0 deletions ci/requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
harmony-py
jupyterlab-quarto
2 changes: 1 addition & 1 deletion ci/start
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ export PANGEO_ENV="openscapes"

# ==== ONLY EDIT WITHIN THIS BLOCK =====

exec "$@"
exec "$@" --ResourceUseDisplay.track_cpu_percent=True

0 comments on commit af5b3dc

Please sign in to comment.