Merge pull request #1378 from mathbunnyru/asalikhov/automatic_conda_versioning

Automatically deduce package versions
This commit is contained in:
Ayaz Salikhov
2021-08-09 20:28:32 +03:00
committed by GitHub
9 changed files with 96 additions and 95 deletions

View File

@@ -1,6 +1,9 @@
name: Build, test, and publish Docker Images name: Build, test, and publish Docker Images
on: on:
schedule:
# Weekly, at 03:00 on Monday UTC time
- cron: "0 3 * * 1"
pull_request: pull_request:
paths-ignore: paths-ignore:
- ".github/ISSUE_TEMPLATE/**" - ".github/ISSUE_TEMPLATE/**"
@@ -78,19 +81,19 @@ jobs:
run: make -C main hook-all run: make -C main hook-all
- name: Push Wiki to GitHub - 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 uses: stefanzweifel/git-auto-commit-action@5dd17c3b53a58c1cb5eaab903826abe94765ccd6 # dependabot updates to latest release
with: with:
commit_message: "[ci skip] Automated publish for ${{github.sha}}" commit_message: "[ci skip] Automated publish for ${{github.sha}}"
repository: wiki/ repository: wiki/
- name: Login to Docker Hub - 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 uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9 # dependabot updates to latest release
with: with:
username: ${{secrets.DOCKERHUB_USERNAME}} username: ${{secrets.DOCKERHUB_USERNAME}}
password: ${{secrets.DOCKERHUB_TOKEN}} password: ${{secrets.DOCKERHUB_TOKEN}}
- name: Push Images to DockerHub - 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 run: make -C main push-all-multi

View File

@@ -24,17 +24,17 @@ USER ${NB_UID}
# R packages including IRKernel which gets installed globally. # R packages including IRKernel which gets installed globally.
RUN mamba install --quiet --yes \ RUN mamba install --quiet --yes \
'r-base=4.1.0' \ 'r-base' \
'r-ggplot2=3.3*' \ 'r-ggplot2' \
'r-irkernel=1.2*' \ 'r-irkernel' \
'r-rcurl=1.98*' \ 'r-rcurl' \
'r-sparklyr=1.7*' && \ 'r-sparklyr' && \
mamba clean --all -f -y && \ mamba clean --all -f -y && \
fix-permissions "${CONDA_DIR}" && \ fix-permissions "${CONDA_DIR}" && \
fix-permissions "/home/${NB_USER}" fix-permissions "/home/${NB_USER}"
# Spylon-kernel # Spylon-kernel
RUN mamba install --quiet --yes 'spylon-kernel=0.4*' && \ RUN mamba install --quiet --yes 'spylon-kernel' && \
mamba clean --all -f -y && \ mamba clean --all -f -y && \
python -m spylon_kernel install --sys-prefix && \ python -m spylon_kernel install --sys-prefix && \
rm -rf "/home/${NB_USER}/.local" && \ rm -rf "/home/${NB_USER}/.local" && \

View File

@@ -3,7 +3,7 @@
# Ubuntu 20.04 (focal) # Ubuntu 20.04 (focal)
# https://hub.docker.com/_/ubuntu/?tab=tags&name=focal # https://hub.docker.com/_/ubuntu/?tab=tags&name=focal
ARG ROOT_CONTAINER=ubuntu:focal-20210609 ARG ROOT_CONTAINER=ubuntu:focal
FROM $ROOT_CONTAINER FROM $ROOT_CONTAINER
@@ -130,9 +130,9 @@ RUN set -x && \
# Do all this in a single RUN command to avoid duplicating all of the # Do all this in a single RUN command to avoid duplicating all of the
# files across image layers when the permissions change # files across image layers when the permissions change
RUN conda install --quiet --yes \ RUN conda install --quiet --yes \
'notebook=6.4.0' \ 'notebook' \
'jupyterhub=1.4.1' \ 'jupyterhub' \
'jupyterlab=3.0.16' && \ 'jupyterlab' && \
conda clean --all -f -y && \ conda clean --all -f -y && \
npm cache clean --force && \ npm cache clean --force && \
jupyter notebook --generate-config && \ jupyter notebook --generate-config && \

View File

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

View File

@@ -193,23 +193,21 @@ diagram](../images/inherit.svg)](http://interactive.blockdiag.com/?compression=d
### Builds ### Builds
Pull requests to the `jupyter/docker-stacks` repository trigger builds of all images on GitHub Actions. Every Monday and whenever a pull requests is merged, images are rebuilt and pushed to the public container registry.
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.
### Versioning ### Versioning via image tags
The `latest` tag in each Docker Hub repository tracks the master branch `HEAD` reference on GitHub. Whenever a docker image is pushed to the container registry, it is tagged with:
`latest` is a moving target, by definition, and will have backward-incompatible changes regularly.
Every image on Docker Hub also receives a 12-character tag which corresponds with the git commit SHA that triggered the image build. - a `latest` tag
You can inspect the state of the `jupyter/docker-stacks` repository for that commit to review the definition of the image - a 12-character git commit SHA like `b9f6ce795cfc`
(e.g., images with tag `33add21fab64` were built from <https://github.com/jupyter/docker-stacks/tree/33add21fab64>. - 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. For stability and reproducibility, you should either reference a date formatted
(e.g. `FROM jupyter/scipy-notebook:33add21fab64`, `docker run -it --rm jupyter/scipy-notebook:33add21fab64`). tag from a date before the current date (in UTC time) or a git commit SHA older
You should only use `latest` when a one-off container instance is acceptable than the latest git commit SHA in the default branch of the
(e.g., you want to briefly try a new library in a notebook). jupyter/docker-stacks GitHub repository.
## Community Stacks ## Community Stacks

View File

@@ -57,7 +57,7 @@ USER ${NB_UID}
# Install pyarrow # Install pyarrow
RUN mamba install --quiet --yes \ RUN mamba install --quiet --yes \
'pyarrow=4.0.*' && \ 'pyarrow' && \
mamba clean --all -f -y && \ mamba clean --all -f -y && \
fix-permissions "${CONDA_DIR}" && \ fix-permissions "${CONDA_DIR}" && \
fix-permissions "/home/${NB_USER}" fix-permissions "/home/${NB_USER}"

View File

@@ -26,31 +26,31 @@ USER ${NB_UID}
# R packages including IRKernel which gets installed globally. # R packages including IRKernel which gets installed globally.
RUN conda install --quiet --yes \ RUN conda install --quiet --yes \
'r-base=4.1.0' \ 'r-base' \
'r-caret=6.*' \ 'r-caret' \
'r-crayon=1.4*' \ 'r-crayon' \
'r-devtools=2.4*' \ 'r-devtools' \
'r-forecast=8.15*' \ 'r-forecast' \
'r-hexbin=1.28*' \ 'r-hexbin' \
'r-htmltools=0.5*' \ 'r-htmltools' \
'r-htmlwidgets=1.5*' \ 'r-htmlwidgets' \
'r-irkernel=1.2*' \ 'r-irkernel' \
'r-nycflights13=1.0*' \ 'r-nycflights13' \
'r-randomforest=4.6*' \ 'r-randomforest' \
'r-rcurl=1.98*' \ 'r-rcurl' \
'r-rmarkdown=2.9*' \ 'r-rmarkdown' \
'r-rodbc=1.3*' \ 'r-rodbc' \
'r-rsqlite=2.2*' \ 'r-rsqlite' \
'r-shiny=1.6*' \ 'r-shiny' \
'r-tidymodels=0.1*' \ 'r-tidymodels' \
'r-tidyverse=1.3*' \ 'r-tidyverse' \
'unixodbc=2.3.*' && \ 'unixodbc' && \
conda clean --all -f -y && \ conda clean --all -f -y && \
fix-permissions "${CONDA_DIR}" && \ fix-permissions "${CONDA_DIR}" && \
fix-permissions "/home/${NB_USER}" fix-permissions "/home/${NB_USER}"
# Install e1071 R package (dependency of the caret R package) # 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 && \ conda clean --all -f -y && \
fix-permissions "${CONDA_DIR}" && \ fix-permissions "${CONDA_DIR}" && \
fix-permissions "/home/${NB_USER}" fix-permissions "/home/${NB_USER}"

View File

@@ -17,34 +17,34 @@ USER ${NB_UID}
# Install Python 3 packages # Install Python 3 packages
RUN conda install --quiet --yes \ RUN conda install --quiet --yes \
'altair=4.1.*' \ 'altair' \
'beautifulsoup4=4.9.*' \ 'beautifulsoup4' \
'bokeh=2.3.*' \ 'bokeh' \
'bottleneck=1.3.*' \ 'bottleneck' \
'cloudpickle=1.6.*' \ 'cloudpickle' \
'conda-forge::blas=*=openblas' \ 'conda-forge::blas=*=openblas' \
'cython=0.29.*' \ 'cython' \
'dask=2021.6.*' \ 'dask' \
'dill=0.3.*' \ 'dill' \
'h5py=3.3.*' \ 'h5py' \
'ipympl=0.7.*'\ 'ipympl'\
'ipywidgets=7.6.*' \ 'ipywidgets' \
'matplotlib-base=3.4.*' \ 'matplotlib-base' \
'numba=0.53.*' \ 'numba' \
'numexpr=2.7.*' \ 'numexpr' \
'pandas=1.3.*' \ 'pandas' \
'patsy=0.5.*' \ 'patsy' \
'protobuf=3.17.*' \ 'protobuf' \
'pytables=3.6.*' \ 'pytables' \
'scikit-image=0.18.*' \ 'scikit-image' \
'scikit-learn=0.24.*' \ 'scikit-learn' \
'scipy=1.7.*' \ 'scipy' \
'seaborn=0.11.*' \ 'seaborn' \
'sqlalchemy=1.4.*' \ 'sqlalchemy' \
'statsmodels=0.12.*' \ 'statsmodels' \
'sympy=1.8.*' \ 'sympy' \
'widgetsnbextension=3.5.*'\ 'widgetsnbextension'\
'xlrd=2.0.*' && \ 'xlrd' && \
conda clean --all -f -y && \ conda clean --all -f -y && \
fix-permissions "${CONDA_DIR}" && \ fix-permissions "${CONDA_DIR}" && \
fix-permissions "/home/${NB_USER}" fix-permissions "/home/${NB_USER}"

View File

@@ -8,7 +8,7 @@ LABEL maintainer="Jupyter Project <jupyter@googlegroups.com>"
# Install Tensorflow # Install Tensorflow
RUN mamba install --quiet --yes \ RUN mamba install --quiet --yes \
'tensorflow=2.4.1' && \ 'tensorflow' && \
mamba clean --all -f -y && \ mamba clean --all -f -y && \
fix-permissions "${CONDA_DIR}" && \ fix-permissions "${CONDA_DIR}" && \
fix-permissions "/home/${NB_USER}" fix-permissions "/home/${NB_USER}"