From ac48cff2becfa6d82ad23e507bc9b05caf7fa75d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rok=20Ro=C5=A1kar?= Date: Wed, 24 Apr 2024 09:22:12 +0200 Subject: [PATCH 1/2] chore: add python 3.11 (#436) --- .../workflows/build-and-push-to-docker.yml | 43 +++++++++++-------- docker/py/Dockerfile | 4 +- 2 files changed, 26 insertions(+), 21 deletions(-) diff --git a/.github/workflows/build-and-push-to-docker.yml b/.github/workflows/build-and-push-to-docker.yml index adb0e4b7..98b512bb 100644 --- a/.github/workflows/build-and-push-to-docker.yml +++ b/.github/workflows/build-and-push-to-docker.yml @@ -56,10 +56,15 @@ jobs: strategy: fail-fast: true matrix: - BASE_PYTHON_VERSION: - - "3.10" - - "3.9" - - "3.8" + include: + - BASE_PYTHON_VERSION: "3.11" + REGISTRY: quay.io + - BASE_PYTHON_VERSION: "3.10" + REGISTRY: docker.io + - BASE_PYTHON_VERSION: "3.9" + REGISTRY: docker.io + - BASE_PYTHON_VERSION: "3.8" + REGISTRY: docker.io steps: - name: Docker Login uses: Azure/docker-login@v1 @@ -83,7 +88,7 @@ jobs: uses: docker/build-push-action@v5 with: build-args: | - BASE_IMAGE=jupyter/base-notebook:python-${{ matrix.BASE_PYTHON_VERSION }} + BASE_IMAGE=${{ matrix.REGISTRY }}/jupyter/base-notebook:python-${{ matrix.BASE_PYTHON_VERSION }} cache-from: type=gha cache-to: type=gha,mode=max context: docker/py @@ -100,13 +105,12 @@ jobs: with: working-directory: tests command: npx mocha -r ts-node/register index.ts - # export the default base image for other jobs to use + # export the base images for other jobs to use - name: Build and export - if: matrix.BASE_PYTHON_VERSION == env.DEFAULT_PYTHON_VERSION uses: docker/build-push-action@v5 with: build-args: | - BASE_IMAGE=jupyter/base-notebook:python-${{ matrix.BASE_PYTHON_VERSION }} + BASE_IMAGE=${{ matrix.REGISTRY }}/jupyter/base-notebook:python-${{ matrix.BASE_PYTHON_VERSION }} cache-from: type=gha context: docker/py labels: ${{ steps.meta.outputs.labels }} @@ -348,24 +352,25 @@ jobs: strategy: fail-fast: true matrix: - EXTENSION: - - vnc - - batch - + include: + - EXTENSION: vnc + PYTHON_VERSION: "3.10" + - EXTENSION: vnc + PYTHON_VERSION: "3.11" + - EXTENSION: batch + PYTHON_VERSION: "3.10" steps: - name: Docker Login uses: Azure/docker-login@v1 with: username: ${{ secrets.RENKU_DOCKER_USERNAME }} password: ${{ secrets.RENKU_DOCKER_PASSWORD }} - - uses: actions/checkout@v4 - name: Set outputs id: vars run: | sha_short=$(git rev-parse --short HEAD) echo "sha_short=$sha_short" >> $GITHUB_OUTPUT - echo "renku_base=${DOCKER_PREFIX}-py:${DEFAULT_PYTHON_VERSION}-${sha_short}" >> $GITHUB_OUTPUT - name: Set up QEMU uses: docker/setup-qemu-action@v3.0.0 - name: Set up Docker Buildx @@ -376,14 +381,14 @@ jobs: with: images: ${{ env.DOCKER_PREFIX }}-${{ matrix.EXTENSION }} tags: | - type=sha,prefix= - type=semver,pattern={{version}},prefix= - type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' }},prefix= + type=sha,prefix=${{ matrix.PYTHON_VERSION }}- + type=semver,pattern={{version}},prefix=${{ matrix.PYTHON_VERSION }}- + type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' }},prefix=${{ matrix.PYTHON_VERSION }}- - name: Build and push uses: docker/build-push-action@v5 with: build-args: | - RENKU_BASE=${{ steps.vars.outputs.renku_base }} + RENKU_BASE=${{ env.DOCKER_PREFIX }}-py:${{ matrix.PYTHON_VERSION }}-${{ steps.vars.outputs.sha_short }} context: docker/${{ matrix.EXTENSION }} labels: ${{ steps.meta.outputs.labels }} push: true @@ -428,7 +433,7 @@ jobs: uses: docker/build-push-action@v5 with: build-args: | - BASE_IMAGE=${{ env.DOCKER_PREFIX }}-vnc:${{ steps.vars.outputs.sha_short }} + BASE_IMAGE=${{ env.DOCKER_PREFIX }}-vnc:${{ env.DEFAULT_PYTHON_VERSION }}-${{ steps.vars.outputs.sha_short }} context: docker/${{ matrix.VNC-EXTENSION }} labels: ${{ steps.meta.outputs.labels }} push: true diff --git a/docker/py/Dockerfile b/docker/py/Dockerfile index 962a5282..cf785db4 100644 --- a/docker/py/Dockerfile +++ b/docker/py/Dockerfile @@ -21,8 +21,8 @@ RUN python3 -m pip install --no-cache-dir -U pip && \ rm -rf "/home/${NB_USER}/.cache" # jupyter sets channel priority to strict which often causes very long error messages -RUN mamba config --system --set channel_priority flexible && \ - mamba clean --all -f -y +RUN conda config --system --set channel_priority flexible && \ + conda clean --all -f -y COPY renku-requirements/requirements.txt /tmp/renku-requirements.txt From ede07983e1137411b096ed3e73fcd430a5f253fc Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 8 May 2024 16:15:31 +0200 Subject: [PATCH 2/2] build(deps): update papermill requirement in /docker/py (#445) Updates the requirements on [papermill](https://github.com/nteract/papermill) to permit the latest version. - [Changelog](https://github.com/nteract/papermill/blob/main/docs/changelog.md) - [Commits](https://github.com/nteract/papermill/compare/2.5.0...2.6.0) --- updated-dependencies: - dependency-name: papermill dependency-type: direct:production ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- docker/py/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/py/requirements.txt b/docker/py/requirements.txt index 6271b968..3a917506 100644 --- a/docker/py/requirements.txt +++ b/docker/py/requirements.txt @@ -5,7 +5,7 @@ jupyter-server-proxy==4.1.2 jupyterlab-git==0.50.0 jupyterlab-system-monitor~=0.8.0 mistune>=2.0.1 # not directly required, pinned by Snyk to avoid a vulnerability -papermill~=2.5.0 +papermill~=2.6.0 requests>=2.20.0 setuptools>=65.5.1 # not directly required, pinned by Snyk to avoid a vulnerability virtualenv>=20.7.2