Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docker: new build with latest Xclim and RavenPy and latest of everything else #106

Merged
merged 48 commits into from Nov 29, 2022
Merged
Show file tree
Hide file tree
Changes from 25 commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
29b4b95
release: update to use image pavics/workflow-tests:220509
tlvu May 9, 2022
1439269
release: update to use image pavics/workflow-tests:220517
tlvu May 17, 2022
b71ab14
docker: remove jupyter-panel-proxy, seems to interfere with 'panel se…
tlvu May 18, 2022
9d8bfc3
release: update to use image pavics/workflow-tests:220518
tlvu May 18, 2022
81aa7f0
docker: add streamlit to self-host streamlit apps if burst limits on …
tlvu May 31, 2022
8108fb0
docker: use micromamba instead of mamba, unable to install mamba alon…
tlvu May 31, 2022
9802099
docker: update syntax for micromamba
tlvu May 31, 2022
7dc1df6
docker: force micromamba to use same prefix root as conda
tlvu Jun 16, 2022
ea6dba9
docker: revert to use mamba because micromamba is missing too many pa…
tlvu Jun 17, 2022
e82cc56
docker: latest libarchive broken, revert to previous known working ver
tlvu Jun 17, 2022
4457278
docker: prefer conda-forge when installing mamba to pull appropriate …
tlvu Jun 17, 2022
655ef6c
release: update to use image pavics/workflow-tests:220617
tlvu Jun 17, 2022
8e05577
docker: add pyston a Python JIT to optimize performance
tlvu Jun 17, 2022
a89d850
docker: fix problem running mamba inside image so can keep mamba inst…
tlvu Jun 17, 2022
0f614f0
release: update to use image pavics/workflow-tests:220617.1
tlvu Jun 17, 2022
2bb3fcd
release: update to use image pavics/workflow-tests:220620
tlvu Jun 20, 2022
d4a1c38
release: update to use image pavics/workflow-tests:220621
tlvu Jun 22, 2022
10a67ab
docker: force latest xclim 0.37.0, was downgraded back to 0.36.0
tlvu Jun 22, 2022
efec598
release: update to use image pavics/workflow-tests:220622
tlvu Jun 22, 2022
11a29b6
docker: add jupyterlab-tabular-data-editor to easily edit .csv file
tlvu Jun 23, 2022
d2bc45a
release: update to use image pavics/workflow-tests:220623
tlvu Jun 23, 2022
c81f7cd
release: update to use image pavics/workflow-tests:220713
tlvu Jul 13, 2022
b24090e
release: update to use image pavics/workflow-tests:220728
tlvu Jul 28, 2022
b590b8e
.gitignore: add PAVICS-landing repo
tlvu Jul 29, 2022
38fb8a8
Update xclim pin, move pymetalink and requests-magpie to conda deps a…
Zeitsperre Sep 7, 2022
991f649
pin python@3.8
Zeitsperre Sep 7, 2022
348c4e0
set create to --yes
Zeitsperre Sep 7, 2022
1d10e24
make notes about python pins
Zeitsperre Sep 12, 2022
0ce3efd
update clisops
Zeitsperre Sep 19, 2022
ae49465
docker: add geopy for pavics_panel_cccs/climate_zones_app/app.py
tlvu Sep 23, 2022
68084cf
release: update to use image pavics/workflow-tests:220728-update220922
tlvu Sep 23, 2022
2d8b763
docker: unpin dask and distributed due to build failure with pinned v…
tlvu Nov 17, 2022
0dc4892
docker: force newer cartopy to avoid selecting wrong python version
tlvu Nov 17, 2022
eb96c94
docker: install mamba into birdy env too as a possible work-around (u…
tlvu Nov 17, 2022
7c45793
Revert "docker: install mamba into birdy env too as a possible work-a…
tlvu Nov 17, 2022
b000380
docker: remove python==3.8 in environment.yml, hopelessly trying to f…
tlvu Nov 17, 2022
c4ab590
remove accidenally added __pycache__ file
tlvu Nov 17, 2022
4571e08
docker: undo shapely pin to see if build stop freezing
tlvu Nov 17, 2022
c2aa4e1
release: update to use image pavics/workflow-tests:221117
tlvu Nov 17, 2022
029dfb8
docker: attempt to prevent accidental downgrade of openssl and setupt…
tlvu Nov 17, 2022
01f676e
docker: maybe can only prevent accidental downgrade of openssl
tlvu Nov 18, 2022
244fabe
docker: finally can not prevent downgrade of openssl
tlvu Nov 18, 2022
0cad928
docker: add flox and python-pptx
tlvu Nov 18, 2022
e60bdce
release: update to use image pavics/workflow-tests:221118
tlvu Nov 18, 2022
01cd524
docker: remove dask and shapely pin since their problems seem to be gone
tlvu Nov 18, 2022
74428f6
docker: pin intake-esm since newer version activated validation of op…
tlvu Nov 18, 2022
29bc88a
docker: typo in intake-esm pin, copy/pasted error from chat
tlvu Nov 18, 2022
290cfc4
release: update to use image pavics/workflow-tests:221118.1
tlvu Nov 18, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -13,6 +13,7 @@ pavics-sdi-*/
finch-*/
raven-*/
esgf-compute-api-*/
PAVICS-landing-*/

# files produced by build
buildout/
Expand Down
2 changes: 1 addition & 1 deletion Jenkinsfile
Expand Up @@ -10,7 +10,7 @@ pipeline {
// https://jenkins.io/doc/book/pipeline/syntax/
agent {
docker {
image "pavics/workflow-tests:220502"
image "pavics/workflow-tests:220728"
label 'linux && docker'
}
}
Expand Down
Binary file added __pycache__/conftest.cpython-38-pytest-7.1.2.pyc
Binary file not shown.
2 changes: 1 addition & 1 deletion binder/Dockerfile
@@ -1,4 +1,4 @@
FROM pavics/workflow-tests:220502
FROM pavics/workflow-tests:220728

USER root

Expand Down
14 changes: 9 additions & 5 deletions docker/Dockerfile
Expand Up @@ -3,8 +3,12 @@ FROM continuumio/miniconda3
# Use mamba for much improved performance over conda.
# The 'channel_priority strict' did help conda but it was not enough.
RUN conda update conda -n base && \
conda install mamba -n base -c defaults -c conda-forge && \
conda config --set channel_priority strict
conda install mamba -n base -c conda-forge -c defaults && \
conda config --set channel_priority strict && \
wget -qO- https://micro.mamba.pm/api/micromamba/linux-64/latest | tar -C /usr/local -xvj bin/micromamba

# Default for micromamba is $HOME/micromamba which is wrong.
ENV MAMBA_ROOT_PREFIX="/opt/conda"

# to checkout other notebooks and to run pip install
RUN apt-get update && \
Expand Down Expand Up @@ -45,8 +49,7 @@ COPY environment.yml /environment.yml
# Pin python=3.8 because according to DavidH, xESMF has not been tested with 3.9 yet.
RUN umask 0000 && \
mamba create --name birdy --channel conda-forge --channel defaults xclim ravenpy python=3.8 && \
mamba env update --name birdy --file /environment.yml && \
conda remove mamba -n base
mamba env update --name birdy --file /environment.yml

# alternate way to 'source activate birdy'
ENV PATH="/opt/conda/envs/birdy/bin:$PATH"
Expand Down Expand Up @@ -97,7 +100,8 @@ RUN wget https://raw.githubusercontent.com/jupyter/docker-stacks/$DOCKER_STACKS_
chmod a+r /etc/jupyter/jupyter_notebook_config.py && \
mkdir /notebook_dir && chown jenkins /notebook_dir && \
chmod a+rwX -R /opt/conda/envs/birdy/fonts && \
chmod a+rwX -R /opt/conda/pkgs/cache
chmod a+rwX -R /opt/conda/pkgs/cache && \
chown jenkins:jenkins -R /opt/conda/pkgs/cache

# For jupyter-panel-proxy launcher.
ENV BOKEH_ALLOW_WS_ORIGIN "*"
Expand Down
26 changes: 17 additions & 9 deletions docker/environment.yml
Expand Up @@ -5,6 +5,7 @@ channels:
- cdat
- bokeh
- plotly # for jupyter-dash
- pyston
- pyviz/label/dev # for jupyter-panel-proxy, panel
- defaults

Expand All @@ -16,10 +17,9 @@ dependencies:
# xclim direct dependencies: https://github.com/conda-forge/xclim-feedstock/blob/master/recipe/meta.yaml
# ravenpy direct dependencies: https://github.com/conda-forge/ravenpy-feedstock/blob/master/recipe/meta.yaml

# Pin latest xclim and ravenpy to avoid downgrading during the second install
# phase. Mamba is quicker to solve dependencies than conda but it is less
# precise so accidental downgrade happends.
- xclim >= 0.32.1
# Pin latest xclim and ravenpy to avoid downgrading during the second installation phase.
# Mamba is quicker to solve dependencies than conda, but it is less precise so accidental downgrades can happen.
- xclim >= 0.38.0
- ravenpy >= 0.7.8

# Pin dask and distributed for slow PAVICStutorial_ClimateDataAnalysis-3Climate-Indicators.ipynb.
Expand All @@ -40,7 +40,7 @@ dependencies:
- cfgrib
- pydap
- cartopy >= 0.20.1
- descartes
- descartes # Is this really needed???
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes descartes is needed, reason in this commit description 90ccbec

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We really need to remove this dependency. There hasn't been a new release in nearly 6 years! Will look into updating that notebook.

# - rasterio # from ravenpy
# - gdal # for osgeo, from ravenpy
# - geopandas # from ravenpy
Expand All @@ -66,6 +66,9 @@ dependencies:
# https://github.com/bird-house/birdhouse-deploy/pull/63#issuecomment-668270608
# pinning hvplot did not solve the problem with violin plot.
- hvplot
# https://streamlit.io/
# https://anaconda.org/conda-forge/streamlit
- streamlit
- nc-time-axis
# - cftime # from xclim and ravenpy
# - statsmodels # for ravenpy
Expand Down Expand Up @@ -156,7 +159,7 @@ dependencies:
- jupytext
# jupyterlab extension for git
- jupyterlab-git
# Voila turns Jupyter notebooks into standalone web applications
# Voilà turns Jupyter notebooks into standalone web applications
- voila
- jupyter-archive
# https://github.com/jtpio/jupyterlab-topbar
Expand All @@ -173,7 +176,8 @@ dependencies:
# https://github.com/dask/dask-labextension
- dask-labextension
# https://github.com/holoviz/jupyter-panel-proxy
- jupyter-panel-proxy >= 0.2.0a2
# DISABLE: seems to interfere with 'panel serve' command
#- jupyter-panel-proxy >= 0.2.0a2
# Force newer nodejs for 'jupyter lab build' issue
# https://github.com/jupyterlab/jupyterlab/issues/11726#issuecomment-998901247
# TODO: remove nodejs once all extensions move to prebuilt extensions, see comment
Expand All @@ -184,18 +188,20 @@ dependencies:
- wget
- nested_dict
- paramiko
- pymetalink # for Raven notebook Extract_geographical_watershed_properties.ipynb
- requests-magpie
- scp
- selenium
- geckodriver
- xlrd
- pre-commit
# https://github.com/pyston/pyston/
- pyston_lite_autoload
# for pip packages
- pip
- pip:
# visual debugger for Jupyter Notebook, not working with JupyterLab at this moment
- pixiedust
- requests-magpie
- pymetalink # for Raven notebook Extract_geographical_watershed_properties.ipynb
# block execution of 'run_all_cells' until user input finished
- ipython_blocking
# Mimics how one might format their calculation if it were written with a
Expand All @@ -209,6 +215,8 @@ dependencies:
- jupyternotify
# https://github.com/jupyterlab-contrib/jupyterlab-logout (was from jupyterlab-topbar)
- jupyterlab-logout
# https://github.com/jupytercalpoly/jupyterlab-tabular-data-editor
- jupyterlab-tabular-data-editor
# Needed to run notebook tests. Missing indirect recursive dependencies
# somewhere, should not need to manually add it here.
- pytest-tornasync
2 changes: 1 addition & 1 deletion launchcontainer
@@ -1,7 +1,7 @@
#!/bin/sh -x

if [ -z "$DOCKER_IMAGE" ]; then
DOCKER_IMAGE="pavics/workflow-tests:220502"
DOCKER_IMAGE="pavics/workflow-tests:220728"
fi

if [ -z "$CONTAINER_NAME" ]; then
Expand Down
2 changes: 1 addition & 1 deletion launchnotebook
Expand Up @@ -7,7 +7,7 @@ if [ -z "$PORT" ]; then
fi

if [ -z "$DOCKER_IMAGE" ]; then
DOCKER_IMAGE="pavics/workflow-tests:220502"
DOCKER_IMAGE="pavics/workflow-tests:220728"
fi

if [ -z "$CONTAINER_NAME" ]; then
Expand Down