Skip to content

Commit

Permalink
Merge pull request #3 from crim-ca/custom-tutorial-notebooks
Browse files Browse the repository at this point in the history
custom notebooks are added to the image
  • Loading branch information
cwcummings authored May 11, 2021
2 parents 3f30f45 + 55f4d55 commit f865380
Show file tree
Hide file tree
Showing 10 changed files with 163 additions and 2 deletions.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,11 @@ These images were first initialized with the packages listed on this
The Docker image builds can be found on Docker Hub :
* [eo](https://hub.docker.com/repository/docker/pavics/crim-jupyter-eo)
* [nlp](https://hub.docker.com/repository/docker/pavics/crim-jupyter-nlp)

The notebooks associated to each specific image are found on this repo, on their corresponding notebook subfolder.

Also, a yaml configuration file can be found for each image, containing a list of parameters used
by the [deploy_data_specific_image script](https://github.com/bird-house/pavics-jupyter-base/blob/master/scheduler-jobs/deploy_data_specific_image)
on the [bird-house/pavics-jupyter-base repo](https://github.com/bird-house/pavics-jupyter-base).
This script is used to download and update the image's associated notebooks that should be available on
the JupyterLab environment for DACCS.
12 changes: 12 additions & 0 deletions eo/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,18 @@ Fixes:
------
- ...

0.2.0 (2021-05-11)
===================

Changes:
--------
- Custom notebooks specific to the environment can now be added to the docker image
- New packages added to environment (rasterio, intake-stac, sat-search)

Fixes:
------
- na

0.1.0 (2021-02-22)
===================

Expand Down
4 changes: 3 additions & 1 deletion eo/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM birdhouse/pavics-jupyter-base:0.1.0
FROM birdhouse/pavics-jupyter-base:0.2.0

# must update conda env as root, because of a permission error when having pip dependencies in the input yml file
USER root
Expand All @@ -15,5 +15,7 @@ RUN umask 0000 && conda env update -f /environment.yml
# (https://github.com/conda-forge/gdal-feedstock/issues/83#issue-162911573)
ENV CPL_ZIP_ENCODING=UTF-8

COPY notebook_config.yml /notebook_config.yml

# specify user because of problem running start-notebook.sh when being root
USER jenkins
5 changes: 5 additions & 0 deletions eo/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@ dependencies:
- affine
- gdal
- geojson
- intake-stac
- pyproj
- rasterio
- sat-search
- shapely

# TODO: These next packages could possibly be added to a more generic 'vision' image, from which 'eo' would be built
Expand All @@ -27,6 +30,8 @@ dependencies:
- six
- tensorboardX
- tqdm
# for pip packages, include even if already in pavics-jupyter-base image, to avoid a warning problem on DockerHub
- pip
- pip:
# Install kornia from pypi, versions from conda are older and create conflicting errors with latest python version
- kornia
Expand Down
15 changes: 15 additions & 0 deletions eo/notebook_config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Config file containing the list of notebooks directories to download for a specific image.
#
# Used in the deploy-data-specific-image script from pavics-jupyter-base.
# More details on this config can be found on this script file :
# https://github.com/bird-house/pavics-jupyter-base/blob/master/scheduler-jobs/deploy_data_specific_image

- repo_url: https://github.com/crim-ca/pavics-jupyter-images
branch: master
source_dir: eo/notebooks
dest_sub_dir: eo

- repo_url: https://github.com/Ouranosinc/pavics-sdi
branch: master
source_dir: docs/source/notebooks
dest_sub_dir: common
45 changes: 45 additions & 0 deletions eo/notebooks/eo_example.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{
"cells": [
{
"cell_type": "markdown",
"id": "framed-intranet",
"metadata": {},
"source": [
"## Example notebook\n",
"\n",
"This is an example notebook just for the image's first version. \n",
"It is used for now to test the integration of the tutorial notebooks in JupyterHub, depending of which environment is selected. \n",
"Additional notebooks should be added in the future."
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "imposed-serve",
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.5"
}
},
"nbformat": 4,
"nbformat_minor": 5
}
11 changes: 11 additions & 0 deletions nlp/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,17 @@ Fixes:
------
- ...

0.2.0 (2021-05-11)
===================

Changes:
--------
- Custom notebooks specific to the environment can now be added to the docker image

Fixes:
------
- na

0.1.0 (2021-02-22)
===================

Expand Down
5 changes: 4 additions & 1 deletion nlp/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM birdhouse/pavics-jupyter-base:0.1.0
FROM birdhouse/pavics-jupyter-base:0.2.0

# must update conda env as root, because of a permission error when having pip dependencies in the input yml file
USER root
Expand All @@ -9,5 +9,8 @@ COPY environment.yml /environment.yml
# use umask 0000 so that package files for the updated environment are usable by the user for the jupyter-conda-extension
RUN umask 0000 && conda env update -f /environment.yml

COPY notebook_config.yml /notebook_config.yml

# specify user because of problem running start-notebook.sh when being root
USER jenkins

15 changes: 15 additions & 0 deletions nlp/notebook_config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Config file containing the list of notebooks directories to download for a specific image.
#
# Used in the deploy-data-specific-image script from pavics-jupyter-base.
# More details on this config can be found on this script file :
# https://github.com/bird-house/pavics-jupyter-base/blob/master/scheduler-jobs/deploy_data_specific_image

- repo_url: https://github.com/crim-ca/pavics-jupyter-images
branch: master
source_dir: nlp/notebooks
dest_sub_dir: nlp

- repo_url: https://github.com/Ouranosinc/pavics-sdi
branch: master
source_dir: docs/source/notebooks
dest_sub_dir: common
45 changes: 45 additions & 0 deletions nlp/notebooks/nlp_example.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{
"cells": [
{
"cell_type": "markdown",
"id": "framed-intranet",
"metadata": {},
"source": [
"## Example notebook\n",
"\n",
"This is an example notebook just for the image's first version. \n",
"It is used for now to test the integration of the tutorial notebooks in JupyterHub, depending of which environment is selected. \n",
"Additional notebooks should be added in the future."
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "imposed-serve",
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.5"
}
},
"nbformat": 4,
"nbformat_minor": 5
}

0 comments on commit f865380

Please sign in to comment.