Skip to content

Commit

Permalink
Merge pull request #2 from crim-ca/add-first-dockerfiles
Browse files Browse the repository at this point in the history
Add first dockerfiles + .yml files
  • Loading branch information
cwcummings authored Mar 8, 2021
2 parents 2f5adbd + b95f421 commit 3f30f45
Show file tree
Hide file tree
Showing 7 changed files with 111 additions and 4 deletions.
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1 +1,15 @@
# pavics-jupyter-images

This repo contains the different Dockerfiles used to create the images available in JupyterHub for DACCS.
These images will be available as image choices when starting a new instance of JupyterLab from the JupyterHub interface.

All Dockerfiles (eo, nlp, etc.) are derived from the 'base' image found on the repo
[bird-house/pavics-jupyter-base](https://github.com/bird-house/pavics-jupyter-base).
Any packages required only for a specific image can be added to its corresponding environment.yml file.

These images were first initialized with the packages listed on this
[Confluence page](https://www.crim.ca/confluence/pages/viewpage.action?pageId=58625163).

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)
11 changes: 11 additions & 0 deletions eo/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,17 @@ Fixes:
------
- ...

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

Changes:
--------
- Updated basic Dockerfile and added basic environment.yml

Fixes:
------
- na

0.0.2 (2020-12-09)
===================

Expand Down
20 changes: 18 additions & 2 deletions eo/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
FROM birdhouse/pavics-jupyter-base:0.0.2
FROM birdhouse/pavics-jupyter-base:0.1.0

RUN echo "test" > /eo-img-test
# must update conda env as root, because of a permission error when having pip dependencies in the input yml file
USER root

COPY environment.yml /environment.yml

# update env "birdy"
# 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

# fix logged warning from GDAL sub-package when accessing Sentinel data via SAFE.ZIP
# only problematic here when using the 'root' conda env
# normal user installation with conda activation configures everything correctly
# (https://github.com/conda-forge/gdal-feedstock/issues/83#issue-162911573)
ENV CPL_ZIP_ENCODING=UTF-8

# specify user because of problem running start-notebook.sh when being root
USER jenkins
36 changes: 36 additions & 0 deletions eo/environment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: birdy
channels:
- conda-forge
- defaults
dependencies:
- affine
- gdal
- geojson
- pyproj
- shapely

# TODO: These next packages could possibly be added to a more generic 'vision' image, from which 'eo' would be built
- h5py
- googledrivedownloader
- opencv
- pillow>=7.1

# TODO: These next packages could possibly be added to a more specific 'ML' image, built from the 'eo' image
- cython
- ddt
- gitdb
- gitpython
- hdf5plugin
- lz4
- pyyaml
- scikit-learn
- six
- tensorboardX
- tqdm
- pip:
# Install kornia from pypi, versions from conda are older and create conflicting errors with latest python version
- kornia
- opencv-python
- orion
- torch
- torchvision>=0.6
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.1.0 (2021-02-22)
===================

Changes:
--------
- Updated basic Dockerfile and added basic environment.yml

Fixes:
------
- na

0.0.2 (2020-12-09)
===================

Expand Down
14 changes: 12 additions & 2 deletions nlp/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
FROM birdhouse/pavics-jupyter-base:0.0.2
FROM birdhouse/pavics-jupyter-base:0.1.0

RUN echo "test" > /nlp-img-test
# must update conda env as root, because of a permission error when having pip dependencies in the input yml file
USER root

COPY environment.yml /environment.yml

# update env "birdy"
# 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

# specify user because of problem running start-notebook.sh when being root
USER jenkins
9 changes: 9 additions & 0 deletions nlp/environment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
name: birdy
channels:
- conda-forge
- defaults
dependencies:
- intake-esm
- intake-stac
- sat-search
- threddsclient

0 comments on commit 3f30f45

Please sign in to comment.