Skip to content

Commit

Permalink
Merge pull request #1378 from mathbunnyru/asalikhov/automatic_conda_v…
Browse files Browse the repository at this point in the history
…ersioning

Automatically deduce package versions
  • Loading branch information
mathbunnyru authored Aug 9, 2021
2 parents 9b6e57c + 617ea3c commit 8e693aa
Show file tree
Hide file tree
Showing 9 changed files with 96 additions and 95 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
name: Build, test, and publish Docker Images

on:
schedule:
# Weekly, at 03:00 on Monday UTC time
- cron: "0 3 * * 1"
pull_request:
paths-ignore:
- ".github/ISSUE_TEMPLATE/**"
Expand Down Expand Up @@ -78,19 +81,19 @@ jobs:
run: make -C main hook-all

- name: Push Wiki to GitHub
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main'
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main' || github.event_name == 'schedule'
uses: stefanzweifel/git-auto-commit-action@5dd17c3b53a58c1cb5eaab903826abe94765ccd6 # dependabot updates to latest release
with:
commit_message: "[ci skip] Automated publish for ${{github.sha}}"
repository: wiki/

- name: Login to Docker Hub
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main'
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main' || github.event_name == 'schedule'
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9 # dependabot updates to latest release
with:
username: ${{secrets.DOCKERHUB_USERNAME}}
password: ${{secrets.DOCKERHUB_TOKEN}}

- name: Push Images to DockerHub
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main'
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main' || github.event_name == 'schedule'
run: make -C main push-all-multi
12 changes: 6 additions & 6 deletions all-spark-notebook/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,17 @@ USER ${NB_UID}

# R packages including IRKernel which gets installed globally.
RUN mamba install --quiet --yes \
'r-base=4.1.0' \
'r-ggplot2=3.3*' \
'r-irkernel=1.2*' \
'r-rcurl=1.98*' \
'r-sparklyr=1.7*' && \
'r-base' \
'r-ggplot2' \
'r-irkernel' \
'r-rcurl' \
'r-sparklyr' && \
mamba clean --all -f -y && \
fix-permissions "${CONDA_DIR}" && \
fix-permissions "/home/${NB_USER}"

# Spylon-kernel
RUN mamba install --quiet --yes 'spylon-kernel=0.4*' && \
RUN mamba install --quiet --yes 'spylon-kernel' && \
mamba clean --all -f -y && \
python -m spylon_kernel install --sys-prefix && \
rm -rf "/home/${NB_USER}/.local" && \
Expand Down
8 changes: 4 additions & 4 deletions base-notebook/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

# Ubuntu 20.04 (focal)
# https://hub.docker.com/_/ubuntu/?tab=tags&name=focal
ARG ROOT_CONTAINER=ubuntu:focal-20210609
ARG ROOT_CONTAINER=ubuntu:focal

FROM $ROOT_CONTAINER

Expand Down Expand Up @@ -130,9 +130,9 @@ RUN set -x && \
# Do all this in a single RUN command to avoid duplicating all of the
# files across image layers when the permissions change
RUN conda install --quiet --yes \
'notebook=6.4.0' \
'jupyterhub=1.4.1' \
'jupyterlab=3.0.16' && \
'notebook' \
'jupyterhub' \
'jupyterlab' && \
conda clean --all -f -y && \
npm cache clean --force && \
jupyter notebook --generate-config && \
Expand Down
40 changes: 20 additions & 20 deletions datascience-notebook/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -55,26 +55,26 @@ USER ${NB_UID}

# R packages including IRKernel which gets installed globally.
RUN conda install --quiet --yes \
'r-base=4.1.0' \
'r-caret=6.0*' \
'r-crayon=1.4*' \
'r-devtools=2.4*' \
'r-forecast=8.15*' \
'r-hexbin=1.28*' \
'r-htmltools=0.5*' \
'r-htmlwidgets=1.5*' \
'r-irkernel=1.2*' \
'r-nycflights13=1.0*' \
'r-randomforest=4.6*' \
'r-rcurl=1.98*' \
'r-rmarkdown=2.9*' \
'r-rodbc=1.3*' \
'r-rsqlite=2.2*' \
'r-shiny=1.6*' \
'r-tidymodels=0.1*' \
'r-tidyverse=1.3*' \
'rpy2=3.4*' \
'unixodbc=2.3.*' && \
'r-base' \
'r-caret' \
'r-crayon' \
'r-devtools' \
'r-forecast' \
'r-hexbin' \
'r-htmltools' \
'r-htmlwidgets' \
'r-irkernel' \
'r-nycflights13' \
'r-randomforest' \
'r-rcurl' \
'r-rmarkdown' \
'r-rodbc' \
'r-rsqlite' \
'r-shiny' \
'r-tidymodels' \
'r-tidyverse' \
'rpy2' \
'unixodbc' && \
conda clean --all -f -y && \
fix-permissions "${CONDA_DIR}" && \
fix-permissions "/home/${NB_USER}"
Expand Down
24 changes: 11 additions & 13 deletions docs/using/selecting.md
Original file line number Diff line number Diff line change
Expand Up @@ -193,23 +193,21 @@ diagram](../images/inherit.svg)](http://interactive.blockdiag.com/?compression=d

### Builds

Pull requests to the `jupyter/docker-stacks` repository trigger builds of all images on GitHub Actions.
These images are for testing purposes only and are not saved for further use.
When pull requests merge to master, all images rebuild on Docker Hub and become available to `docker pull` from Docker Hub.
Every Monday and whenever a pull requests is merged, images are rebuilt and pushed to the public container registry.

### Versioning
### Versioning via image tags

The `latest` tag in each Docker Hub repository tracks the master branch `HEAD` reference on GitHub.
`latest` is a moving target, by definition, and will have backward-incompatible changes regularly.
Whenever a docker image is pushed to the container registry, it is tagged with:

Every image on Docker Hub also receives a 12-character tag which corresponds with the git commit SHA that triggered the image build.
You can inspect the state of the `jupyter/docker-stacks` repository for that commit to review the definition of the image
(e.g., images with tag `33add21fab64` were built from <https://github.com/jupyter/docker-stacks/tree/33add21fab64>.
- a `latest` tag
- a 12-character git commit SHA like `b9f6ce795cfc`
- a date formatted like `2021-08-29`
- a set of software version tags like `python-3.9.6` and `lab-3.0.16`

You must refer to git-SHA image tags when stability and reproducibility are important in your work.
(e.g. `FROM jupyter/scipy-notebook:33add21fab64`, `docker run -it --rm jupyter/scipy-notebook:33add21fab64`).
You should only use `latest` when a one-off container instance is acceptable
(e.g., you want to briefly try a new library in a notebook).
For stability and reproducibility, you should either reference a date formatted
tag from a date before the current date (in UTC time) or a git commit SHA older
than the latest git commit SHA in the default branch of the
jupyter/docker-stacks GitHub repository.

## Community Stacks

Expand Down
2 changes: 1 addition & 1 deletion pyspark-notebook/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ USER ${NB_UID}

# Install pyarrow
RUN mamba install --quiet --yes \
'pyarrow=4.0.*' && \
'pyarrow' && \
mamba clean --all -f -y && \
fix-permissions "${CONDA_DIR}" && \
fix-permissions "/home/${NB_USER}"
Expand Down
40 changes: 20 additions & 20 deletions r-notebook/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,31 +26,31 @@ USER ${NB_UID}

# R packages including IRKernel which gets installed globally.
RUN conda install --quiet --yes \
'r-base=4.1.0' \
'r-caret=6.*' \
'r-crayon=1.4*' \
'r-devtools=2.4*' \
'r-forecast=8.15*' \
'r-hexbin=1.28*' \
'r-htmltools=0.5*' \
'r-htmlwidgets=1.5*' \
'r-irkernel=1.2*' \
'r-nycflights13=1.0*' \
'r-randomforest=4.6*' \
'r-rcurl=1.98*' \
'r-rmarkdown=2.9*' \
'r-rodbc=1.3*' \
'r-rsqlite=2.2*' \
'r-shiny=1.6*' \
'r-tidymodels=0.1*' \
'r-tidyverse=1.3*' \
'unixodbc=2.3.*' && \
'r-base' \
'r-caret' \
'r-crayon' \
'r-devtools' \
'r-forecast' \
'r-hexbin' \
'r-htmltools' \
'r-htmlwidgets' \
'r-irkernel' \
'r-nycflights13' \
'r-randomforest' \
'r-rcurl' \
'r-rmarkdown' \
'r-rodbc' \
'r-rsqlite' \
'r-shiny' \
'r-tidymodels' \
'r-tidyverse' \
'unixodbc' && \
conda clean --all -f -y && \
fix-permissions "${CONDA_DIR}" && \
fix-permissions "/home/${NB_USER}"

# Install e1071 R package (dependency of the caret R package)
RUN conda install --quiet --yes r-e1071 && \
RUN conda install --quiet --yes 'r-e1071' && \
conda clean --all -f -y && \
fix-permissions "${CONDA_DIR}" && \
fix-permissions "/home/${NB_USER}"
54 changes: 27 additions & 27 deletions scipy-notebook/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,34 +17,34 @@ USER ${NB_UID}

# Install Python 3 packages
RUN conda install --quiet --yes \
'altair=4.1.*' \
'beautifulsoup4=4.9.*' \
'bokeh=2.3.*' \
'bottleneck=1.3.*' \
'cloudpickle=1.6.*' \
'altair' \
'beautifulsoup4' \
'bokeh' \
'bottleneck' \
'cloudpickle' \
'conda-forge::blas=*=openblas' \
'cython=0.29.*' \
'dask=2021.6.*' \
'dill=0.3.*' \
'h5py=3.3.*' \
'ipympl=0.7.*'\
'ipywidgets=7.6.*' \
'matplotlib-base=3.4.*' \
'numba=0.53.*' \
'numexpr=2.7.*' \
'pandas=1.3.*' \
'patsy=0.5.*' \
'protobuf=3.17.*' \
'pytables=3.6.*' \
'scikit-image=0.18.*' \
'scikit-learn=0.24.*' \
'scipy=1.7.*' \
'seaborn=0.11.*' \
'sqlalchemy=1.4.*' \
'statsmodels=0.12.*' \
'sympy=1.8.*' \
'widgetsnbextension=3.5.*'\
'xlrd=2.0.*' && \
'cython' \
'dask' \
'dill' \
'h5py' \
'ipympl'\
'ipywidgets' \
'matplotlib-base' \
'numba' \
'numexpr' \
'pandas' \
'patsy' \
'protobuf' \
'pytables' \
'scikit-image' \
'scikit-learn' \
'scipy' \
'seaborn' \
'sqlalchemy' \
'statsmodels' \
'sympy' \
'widgetsnbextension'\
'xlrd' && \
conda clean --all -f -y && \
fix-permissions "${CONDA_DIR}" && \
fix-permissions "/home/${NB_USER}"
Expand Down
2 changes: 1 addition & 1 deletion tensorflow-notebook/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ LABEL maintainer="Jupyter Project <[email protected]>"

# Install Tensorflow
RUN mamba install --quiet --yes \
'tensorflow=2.4.1' && \
'tensorflow' && \
mamba clean --all -f -y && \
fix-permissions "${CONDA_DIR}" && \
fix-permissions "/home/${NB_USER}"

0 comments on commit 8e693aa

Please sign in to comment.