From 628c1730c37952d2df6fa266bbd166a0dee8656e Mon Sep 17 00:00:00 2001 From: Tasko Olevski Date: Fri, 22 Nov 2024 15:34:34 +0100 Subject: [PATCH 01/20] feat: add vscode images for new amalthea --- .../workflows/build-and-push-to-docker.yml | 221 ++++++++++++++++++ docker/vscode/R.Dockerfile | 25 ++ docker/vscode/README.md | 8 + docker/vscode/base.Dockerfile | 13 ++ docker/vscode/conda.Dockerfile | 19 ++ docker/vscode/poetry.Dockerfile | 23 ++ 6 files changed, 309 insertions(+) create mode 100644 docker/vscode/R.Dockerfile create mode 100644 docker/vscode/README.md create mode 100644 docker/vscode/base.Dockerfile create mode 100644 docker/vscode/conda.Dockerfile create mode 100644 docker/vscode/poetry.Dockerfile diff --git a/.github/workflows/build-and-push-to-docker.yml b/.github/workflows/build-and-push-to-docker.yml index 9c6c8ce0..44d39c84 100644 --- a/.github/workflows/build-and-push-to-docker.yml +++ b/.github/workflows/build-and-push-to-docker.yml @@ -42,6 +42,10 @@ jobs: - docker/julia/Dockerfile - docker/batch/Dockerfile - docker/qgis/Dockerfile + - docker/vscodium/base.Dockerfile + - docker/vscodium/conda.Dockerfile + - docker/vscodium/poetry.Dockerfile + - docker/vscodium/R.Dockerfile runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -698,3 +702,220 @@ jobs: tags: ${{ steps.meta.outputs.tags }} cache-from: type=gha provenance: false + + build-vscode-base: + needs: lint + runs-on: ubuntu-latest + + strategy: + fail-fast: true + matrix: + include: + - DEBIAN_VERSION: debian + - DEBIAN_VERSION: bookworm + steps: + - name: Docker Login + uses: docker/login-action@v3 + with: + username: ${{ secrets.RENKU_DOCKER_USERNAME }} + password: ${{ secrets.RENKU_DOCKER_PASSWORD }} + - uses: actions/checkout@v4 + - name: Set up QEMU + uses: docker/setup-qemu-action@v3.2.0 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - name: Docker meta + id: meta + uses: docker/metadata-action@v5 + with: + images: ${{ env.DOCKER_PREFIX }}-vscode + tags: | + type=sha,prefix=${{ matrix.DEBIAN_VERSION }}- + type=semver,pattern={{version}},prefix=${{ matrix.DEBIAN_VERSION }}- + type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' && matrix.DEBIAN_VERSION == 'debian' }} + - name: Build and export + uses: docker/build-push-action@v6 + with: + build-args: | + BASE_IMAGE=mcr.microsoft.com/devcontainers/base:${{ matrix.DEBIAN_VERSION }} + cache-from: type=gha + cache-to: type=gha,mode=max + context: docker/vscode + file: docker/vscode/base.Dockerfile + labels: ${{ steps.meta.outputs.labels }} + push: true + tags: ${{ steps.meta.outputs.tags }} + provenance: false + + build-vscode-conda: + needs: build-vscode-base + runs-on: ubuntu-latest + + strategy: + fail-fast: true + matrix: + include: + - CONDA_VERSION: 24.9.2-0 + BASE_DEBIAN_VERSION: bookworm + - CONDA_VERSION: latest + BASE_DEBIAN_VERSION: bookworm + steps: + - 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}-vscode:${{ matrix.BASE_DEBIAN_VERSION }}-${sha_short}" >> $GITHUB_OUTPUT + - name: Docker Login + uses: docker/login-action@v3 + with: + username: ${{ secrets.RENKU_DOCKER_USERNAME }} + password: ${{ secrets.RENKU_DOCKER_PASSWORD }} + - uses: actions/checkout@v4 + - name: Set up QEMU + uses: docker/setup-qemu-action@v3.2.0 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - name: Docker meta + id: meta + uses: docker/metadata-action@v5 + with: + images: ${{ env.DOCKER_PREFIX }}-vscode-conda + tags: | + type=sha,prefix=${{ matrix.CONDA_VERSION }}- + type=semver,pattern={{version}},prefix=${{ matrix.CONDA_VERSION }}- + type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' && matrix.CONDA_VERSION == 'latest' }} + - name: Build and export + uses: docker/build-push-action@v6 + with: + build-args: | + BASE_IMAGE=${{ steps.vars.outputs.renku_base }} + cache-from: type=gha + cache-to: type=gha,mode=max + context: docker/vscode + file: docker/vscode/conda.Dockerfile + labels: ${{ steps.meta.outputs.labels }} + push: true + tags: ${{ steps.meta.outputs.tags }} + provenance: false + + build-vscode-poetry: + needs: build-vscode-base + runs-on: ubuntu-latest + + strategy: + fail-fast: true + matrix: + include: + - PYTHON_VERSION: 3.12.7 + BASE_DEBIAN_VERSION: bookworm + PYENV_VERSION: v2.4.17 + POETRY_VERSION: 1.8.4 + LATEST: true + - PYTHON_VERSION: 3.11.10 + BASE_DEBIAN_VERSION: bookworm + PYENV_VERSION: v2.4.17 + POETRY_VERSION: 1.8.4 + LATEST: false + - PYTHON_VERSION: 3.10.15 + BASE_DEBIAN_VERSION: bookworm + PYENV_VERSION: v2.4.17 + POETRY_VERSION: 1.8.4 + LATEST: false + steps: + - 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}-vscode:${{ matrix.BASE_DEBIAN_VERSION }}-${sha_short}" >> $GITHUB_OUTPUT + - name: Docker Login + uses: docker/login-action@v3 + with: + username: ${{ secrets.RENKU_DOCKER_USERNAME }} + password: ${{ secrets.RENKU_DOCKER_PASSWORD }} + - uses: actions/checkout@v4 + - name: Set up QEMU + uses: docker/setup-qemu-action@v3.2.0 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - name: Docker meta + id: meta + uses: docker/metadata-action@v5 + with: + images: ${{ env.DOCKER_PREFIX }}-vscode-poetry + tags: | + type=sha,prefix=py-${{ matrix.PYTHON_VERSION }}- + type=semver,pattern={{version}},prefix=py-${{ matrix.PYTHON_VERSION }}- + type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' && matrix.LATEST }} + - name: Build and export + uses: docker/build-push-action@v6 + with: + build-args: | + BASE_IMAGE=${{ steps.vars.outputs.renku_base }} + PYTHON_VERSION=${{ matrix.PYTHON_VERSION }} + POETRY_VERSION=${{ matrix.POETRY_VERSION }} + PYENV_VERSION=${{ matrix.PYENV_VERSION }} + cache-from: type=gha + cache-to: type=gha,mode=max + context: docker/vscode + file: docker/vscode/poetry.Dockerfile + labels: ${{ steps.meta.outputs.labels }} + push: true + tags: ${{ steps.meta.outputs.tags }} + provenance: false + + build-vscode-r: + needs: build-vscode-base + runs-on: ubuntu-latest + + strategy: + fail-fast: true + matrix: + include: + - R_VERSION: 4.4.2 + LATEST: true + - R_VERSION: 4.3.3 + LATEST: false + - R_VERSION: 4.2.3 + LATEST: false + steps: + - 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}-vscode:${{ matrix.BASE_DEBIAN_VERSION }}-${sha_short}" >> $GITHUB_OUTPUT + - name: Docker Login + uses: docker/login-action@v3 + with: + username: ${{ secrets.RENKU_DOCKER_USERNAME }} + password: ${{ secrets.RENKU_DOCKER_PASSWORD }} + - uses: actions/checkout@v4 + - name: Set up QEMU + uses: docker/setup-qemu-action@v3.2.0 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - name: Docker meta + id: meta + uses: docker/metadata-action@v5 + with: + images: ${{ env.DOCKER_PREFIX }}-vscode-r + tags: | + type=sha,prefix=${{ matrix.R_VERSION }}- + type=semver,pattern={{version}},prefix=${{ matrix.R_VERSION }}- + type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' && matrix.LATEST }} + - name: Build and export + uses: docker/build-push-action@v6 + with: + build-args: | + BASE_IMAGE=${{ steps.vars.outputs.renku_base }} + R_VERSION=${{ matrix.R_VERSION }} + cache-from: type=gha + cache-to: type=gha,mode=max + context: docker/vscode + file: docker/vscode/poetry.Dockerfile + labels: ${{ steps.meta.outputs.labels }} + push: true + tags: ${{ steps.meta.outputs.tags }} + provenance: false diff --git a/docker/vscode/R.Dockerfile b/docker/vscode/R.Dockerfile new file mode 100644 index 00000000..022b9c80 --- /dev/null +++ b/docker/vscode/R.Dockerfile @@ -0,0 +1,25 @@ +ARG BASE_IMAGE=renku/renkulab-vscode:latest +FROM $BASE_IMAGE +ARG R_VERSION=4.4.2 +ARG SESSION_USER=vscode +ARG WORKDIR=/home/${SESSION_USER}/work + +USER root +# From https://docs.posit.co/resources/install-r.html +RUN curl -O https://cdn.rstudio.com/r/debian-12/pkgs/r-${R_VERSION}_1_amd64.deb \ + && apt-get update \ + && apt-get install -y ./r-${R_VERSION}_1_amd64.deb \ + && rm -rf /var/lib/apt/lists/* \ + && rm -rf ./r-${R_VERSION}_1_amd64.deb \ + && sudo ln -s /opt/R/${R_VERSION}/bin/R /usr/local/bin/R \ + && sudo ln -s /opt/R/${R_VERSION}/bin/Rscript /usr/local/bin/Rscript + +USER ${SESSION_USER} +WORKDIR ${WORKDIR} +# The .Renviron changes allow R to install packages in the work directory +# See https://www.r-bloggers.com/2020/10/customizing-your-package-library-location/ +# The .Rprofile changes allow R to be able to use precompiled packages +# See https://packagemanager.posit.co/client/#/repos/cran/setup +RUN mkdir -p ${WORKDIR}/.rlibs \ + && echo "\nR_LIBS_SITE=\"${WORKDIR}/.rlibs\"\n" >> /home/${SESSION_USER}/.Renviron \ + && echo "\noptions(repos = c(CRAN = \"https://packagemanager.posit.co/cran/__linux__/bookworm/latest\"))\n" >> /home/${SESSION_USER}/.Rprofile diff --git a/docker/vscode/README.md b/docker/vscode/README.md new file mode 100644 index 00000000..709a100c --- /dev/null +++ b/docker/vscode/README.md @@ -0,0 +1,8 @@ +# Images with VSCodium + +The devcontainer images here are a great base for this: +https://hub.docker.com/r/microsoft/vscode-devcontainers + +They do not contain vscode in them. They contain an executable +that is called `code` but that is just a shell script that +prints a message that VSCode is not installed. diff --git a/docker/vscode/base.Dockerfile b/docker/vscode/base.Dockerfile new file mode 100644 index 00000000..fcc82b1c --- /dev/null +++ b/docker/vscode/base.Dockerfile @@ -0,0 +1,13 @@ +ARG BASE_IMAGE=mcr.microsoft.com/devcontainers/base:bookworm +FROM $BASE_IMAGE +ARG VSCODIUM_VERSION=1.95.2.24313 +ARG SESSION_USER=vscode +RUN apt-get update && \ + apt-get install -y curl tini git-lfs && \ + mkdir -p /codium-server && \ + curl -L https://github.com/VSCodium/vscodium/releases/download/${VSCODIUM_VERSION}/vscodium-reh-web-linux-x64-${VSCODIUM_VERSION}.tar.gz | tar -xz -C /codium-server && \ + rm -rf /var/lib/apt/lists/* + +USER ${SESSION_USER} +ENTRYPOINT ["tini", "--", "sh", "-c"] +CMD ["/codium-server/bin/codium-server --server-base-path $RENKU_BASE_URL_PATH/ --without-connection-token --host 0.0.0.0 --port 8888"] diff --git a/docker/vscode/conda.Dockerfile b/docker/vscode/conda.Dockerfile new file mode 100644 index 00000000..6acd188a --- /dev/null +++ b/docker/vscode/conda.Dockerfile @@ -0,0 +1,19 @@ +ARG BASE_IMAGE=renku/renkulab-vscode:latest +FROM $BASE_IMAGE +ARG MINIFORGE_VERSION=24.9.2-0 +ARG OS=Linux +ARG ARCH=x86_64 +ARG SESSION_USER=vscode +ARG WORKDIR=/home/${SESSION_USER}/work +ARG VENVS_PATH=${WORKDIR}/.venvs +ENV VENVS_PATH=${VENVS_PATH} +USER root +RUN apt-get update && \ + apt-get install -y curl && \ + curl -L "https://github.com/conda-forge/miniforge/releases/download/${MINIFORGE_VERSION}/Miniforge3-${OS}-${ARCH}.sh" -o install.sh && \ + rm -rf /var/lib/apt/lists/* + +USER ${SESSION_USER} +WORKDIR ${WORKDIR} +ENTRYPOINT ["tini", "--", "sh", "-c"] +CMD ["bash /install.sh -b -u -p ${VENVS_PATH} && ${VENVS_PATH}/bin/conda init && /codium-server/bin/codium-server --server-base-path $RENKU_BASE_URL_PATH/ --without-connection-token --host 0.0.0.0 --port 8888"] diff --git a/docker/vscode/poetry.Dockerfile b/docker/vscode/poetry.Dockerfile new file mode 100644 index 00000000..30cc7476 --- /dev/null +++ b/docker/vscode/poetry.Dockerfile @@ -0,0 +1,23 @@ +ARG BASE_IMAGE=renku/renkulab-vscode:latest +FROM $BASE_IMAGE +ARG PYENV_VERSION=v2.4.17 +ARG PYTHON_VERSION=3.12.7 +# Empty string for poetry version means the latest version +ARG POETRY_VERSION="" +ARG SESSION_USER=vscode +ARG WORKDIR=/home/${SESSION_USER}/work +ARG VENVS_PATH=${WORKDIR}/.venvs +USER root +RUN apt-get update && \ + apt-get install -y curl libz-dev libreadline-dev libncurses-dev libsqlite3-dev libssl-dev liblzma-dev libgdbm-dev libbz2-dev libffi-dev && \ + mkdir -p /python-build && \ + curl -L https://github.com/pyenv/pyenv/archive/refs/tags/${PYENV_VERSION}.tar.gz | tar -xz -C /python-build && \ + /bin/sh /python-build/*/plugins/python-build/install.sh && \ + python-build ${PYTHON_VERSION} /usr/local && \ + rm -rf /python-build && \ + rm -rf /var/lib/apt/lists/* + +USER ${SESSION_USER} +RUN curl -sSL https://install.python-poetry.org | python3 - --version=${POETRY_VERSION} && \ + /home/${SESSION_USER}/.local/bin/poetry config virtualenvs.path ${VENVS_PATH} +WORKDIR ${WORKDIR} From 11c65f0a719c30a6af1cccf002ed6650180bd621 Mon Sep 17 00:00:00 2001 From: Tasko Olevski Date: Fri, 22 Nov 2024 15:35:42 +0100 Subject: [PATCH 02/20] revertme: disable all other CI pipelines --- .../workflows/build-and-push-to-docker.yml | 1296 ++++++++--------- 1 file changed, 648 insertions(+), 648 deletions(-) diff --git a/.github/workflows/build-and-push-to-docker.yml b/.github/workflows/build-and-push-to-docker.yml index 44d39c84..4b9f6951 100644 --- a/.github/workflows/build-and-push-to-docker.yml +++ b/.github/workflows/build-and-push-to-docker.yml @@ -54,654 +54,654 @@ jobs: dockerfile: ${{ matrix.DOCKERFILE_PATH }} config: .hadolint.yaml - build-py: - needs: lint - runs-on: ubuntu-latest - - strategy: - fail-fast: true - matrix: - 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: docker/login-action@v3 - with: - username: ${{ secrets.RENKU_DOCKER_USERNAME }} - password: ${{ secrets.RENKU_DOCKER_PASSWORD }} - - uses: actions/checkout@v4 - - name: Set up QEMU - uses: docker/setup-qemu-action@v3.2.0 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - name: Docker meta - id: meta - uses: docker/metadata-action@v5 - with: - images: ${{ env.DOCKER_PREFIX }}-py - tags: | - type=sha,prefix=${{ matrix.BASE_PYTHON_VERSION }}- - - name: Build and load - uses: docker/build-push-action@v6 - with: - build-args: | - 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 - labels: ${{ steps.meta.outputs.labels }} - load: true - tags: ${{ steps.meta.outputs.tags }} - provenance: false - - name: Image Acceptance Tests - uses: cypress-io/github-action@v6 - env: - TEST_IMAGE_NAME: ${{ env.DOCKER_PREFIX }}-py:${{ steps.meta.outputs.version }} - TEST_USER_NAME: jovyan - TEST_SPEC: jupyterlab.cy.ts - with: - working-directory: tests - command: npx mocha -r ts-node/register index.ts - # export the base images for other jobs to use - - name: Build and export - uses: docker/build-push-action@v6 - with: - build-args: | - BASE_IMAGE=${{ matrix.REGISTRY }}/jupyter/base-notebook:python-${{ matrix.BASE_PYTHON_VERSION }} - cache-from: type=gha - context: docker/py - labels: ${{ steps.meta.outputs.labels }} - push: true - tags: ${{ steps.meta.outputs.tags }} - provenance: false - - build-py-homedir-env: - needs: lint - runs-on: ubuntu-latest - - strategy: - fail-fast: true - matrix: - BASE_PYTHON_VERSION: - - "3.10" - - "3.9" - - "3.8" - steps: - - name: Docker Login - uses: docker/login-action@v3 - with: - username: ${{ secrets.RENKU_DOCKER_USERNAME }} - password: ${{ secrets.RENKU_DOCKER_PASSWORD }} - - uses: actions/checkout@v4 - - name: Set up QEMU - uses: docker/setup-qemu-action@v3.2.0 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - name: Docker meta - id: meta - uses: docker/metadata-action@v5 - with: - images: ${{ env.DOCKER_PREFIX }}-py-homedir-envs - tags: | - type=sha,prefix=${{ matrix.BASE_PYTHON_VERSION }}- - type=semver,pattern={{version}},prefix=${{ matrix.BASE_PYTHON_VERSION }}- - type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' && matrix.BASE_PYTHON_VERSION == env.DEFAULT_PYTHON_VERSION }} - - name: Build and load - uses: docker/build-push-action@v6 - with: - build-args: | - BASE_IMAGE=jupyter/base-notebook:python-${{ matrix.BASE_PYTHON_VERSION }} - CONDA_ENVS_DIRS=/home/jovyan/work/envs - cache-from: type=gha - cache-to: type=gha,mode=max - context: docker/py - labels: ${{ steps.meta.outputs.labels }} - load: true - tags: ${{ steps.meta.outputs.tags }} - provenance: false - - name: Image Acceptance Tests - uses: cypress-io/github-action@v6 - env: - TEST_IMAGE_NAME: ${{ env.DOCKER_PREFIX }}-py-homedir-envs:${{ steps.meta.outputs.version }} - TEST_USER_NAME: jovyan - TEST_SPEC: jupyterlab.cy.ts - with: - working-directory: tests - command: npx mocha -r ts-node/register index.ts - # export the default base image for other jobs to use - - name: Build and export - if: matrix.BASE_PYTHON_VERSION == env.DEFAULT_PYTHON_VERSION - uses: docker/build-push-action@v6 - with: - build-args: | - BASE_IMAGE=jupyter/base-notebook:python-${{ matrix.BASE_PYTHON_VERSION }} - CONDA_ENVS_DIRS=/home/jovyan/work/envs - cache-from: type=gha - context: docker/py - labels: ${{ steps.meta.outputs.labels }} - push: true - tags: ${{ steps.meta.outputs.tags }} - provenance: false - - build-py-multiarch: - needs: build-py - runs-on: ubuntu-latest - - strategy: - fail-fast: true - matrix: - 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: docker/login-action@v3 - with: - username: ${{ secrets.RENKU_DOCKER_USERNAME }} - password: ${{ secrets.RENKU_DOCKER_PASSWORD }} - - uses: actions/checkout@v4 - - name: Set up QEMU - uses: docker/setup-qemu-action@v3.2.0 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - name: Docker meta - id: meta - uses: docker/metadata-action@v5 - with: - images: ${{ env.DOCKER_PREFIX }}-py - tags: | - type=sha,prefix=${{ matrix.BASE_PYTHON_VERSION }}- - type=semver,pattern={{version}},prefix=${{ matrix.BASE_PYTHON_VERSION }}- - type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' && matrix.BASE_PYTHON_VERSION == env.DEFAULT_PYTHON_VERSION }} - - name: Build and push - uses: docker/build-push-action@v6 - with: - context: docker/py - push: true - tags: ${{ steps.meta.outputs.tags }} - labels: ${{ steps.meta.outputs.labels }} - cache-to: type=gha,mode=max - cache-from: type=gha - build-args: | - BASE_IMAGE=${{ matrix.REGISTRY }}/jupyter/base-notebook:python-${{ matrix.BASE_PYTHON_VERSION }} - platforms: linux/amd64,linux/arm64 - provenance: false - - build-cuda: - needs: build-py - runs-on: ubuntu-latest - - strategy: - fail-fast: true - matrix: - include: - # taken from tensorflow compatibility chart at https://www.tensorflow.org/install/source#gpu - - CUDA_VERSION: "11.2" - EXTRA_LIBRARIES: "" - CUDA_CUDART_PACKAGE: "cuda-cudart-11-2=11.2.152-1" - CUDA_COMPAT_PACKAGE: "cuda-compat-11-2" - LIBCUDNN_PACKAGE: "libcudnn8=8.1.1.33-1+cuda11.2" - - CUDA_VERSION: "11.3" - EXTRA_LIBRARIES: "" - CUDA_CUDART_PACKAGE: "cuda-cudart-11-3=11.3.109-1" - CUDA_COMPAT_PACKAGE: "cuda-compat-11-3" - LIBCUDNN_PACKAGE: "libcudnn8=8.2.1.32-1+cuda11.3" - - CUDA_VERSION: "11.4" - EXTRA_LIBRARIES: "" - CUDA_CUDART_PACKAGE: "cuda-cudart-11-4=11.4.148-1" - CUDA_COMPAT_PACKAGE: "cuda-compat-11-4" - LIBCUDNN_PACKAGE: "libcudnn8=8.2.4.15-1+cuda11.4" - - CUDA_VERSION: "11.5" - EXTRA_LIBRARIES: "" - CUDA_CUDART_PACKAGE: "cuda-cudart-11-5=11.5.117-1" - CUDA_COMPAT_PACKAGE: "cuda-compat-11-5" - LIBCUDNN_PACKAGE: "libcudnn8=8.3.2.44-1+cuda11.5" - - CUDA_VERSION: "11.7" - EXTRA_LIBRARIES: "" - CUDA_CUDART_PACKAGE: "cuda-cudart-11-7=11.7.60-1" - CUDA_COMPAT_PACKAGE: "cuda-compat-11-7" - LIBCUDNN_PACKAGE: "libcudnn8=8.5.0.96-1+cuda11.7" - - CUDA_VERSION: "11.8" - EXTRA_LIBRARIES: "" - CUDA_CUDART_PACKAGE: "cuda-cudart-11-8=11.8.89-1" - CUDA_COMPAT_PACKAGE: "cuda-compat-11-8" - LIBCUDNN_PACKAGE: "libcudnn8=8.6.0.163-1+cuda11.8" - ADD_2204_APT_REPOS: "true" - - CUDA_VERSION: "12.2" - EXTRA_LIBRARIES: "" - CUDA_CUDART_PACKAGE: "cuda-cudart-12-2=12.2.140-1" - CUDA_COMPAT_PACKAGE: "cuda-compat-12-2" - LIBCUDNN_PACKAGE: "libcudnn8=8.9.5.29-1+cuda12.2" - ADD_2204_APT_REPOS: "true" - steps: - - name: Docker Login - uses: docker/login-action@v3 - 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 Docker Buildx - uses: docker/setup-buildx-action@v3 - - name: Docker meta - id: meta - uses: docker/metadata-action@v5 - with: - images: ${{ env.DOCKER_PREFIX }}-cuda - tags: | - type=sha,prefix=${{ matrix.CUDA_VERSION }}- - type=semver,pattern={{version}},prefix=${{ matrix.CUDA_VERSION }}- - type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' && matrix.CUDA_VERSION == '11.7' }} - - name: Build and load - uses: docker/build-push-action@v6 - with: - build-args: | - RENKU_BASE=${{ steps.vars.outputs.renku_base }} - CUDA_COMPAT_PACKAGE=${{ matrix.CUDA_COMPAT_PACKAGE }} - CUDA_CUDART_PACKAGE=${{ matrix.CUDA_CUDART_PACKAGE }} - CUDA_VERSION=${{ matrix.CUDA_VERSION }} - EXTRA_LIBRARIES=${{ matrix.EXTRA_LIBRARIES }} - LIBCUDNN_PACKAGE=${{ matrix.LIBCUDNN_PACKAGE }} - ADD_2204_APT_REPOS=${{ matrix.ADD_2204_APT_REPOS }} - context: docker/cuda - labels: ${{ steps.meta.outputs.labels }} - load: true - tags: ${{ steps.meta.outputs.tags }} - cache-from: | - type=inline - type=registry,ref=${{ steps.vars.outputs.renku_base }} - provenance: false - - name: Image Acceptance Tests - uses: cypress-io/github-action@v6 - env: - TEST_IMAGE_NAME: ${{ env.DOCKER_PREFIX }}-cuda:${{ steps.meta.outputs.version }} - TEST_USER_NAME: jovyan - TEST_SPEC: jupyterlab.cy.ts - with: - working-directory: tests - command: npx mocha -r ts-node/register index.ts - - name: Build and push - uses: docker/build-push-action@v6 - with: - build-args: | - RENKU_BASE=${{ steps.vars.outputs.renku_base }} - CUDA_COMPAT_PACKAGE=${{ matrix.CUDA_COMPAT_PACKAGE }} - CUDA_CUDART_PACKAGE=${{ matrix.CUDA_CUDART_PACKAGE }} - CUDA_VERSION=${{ matrix.CUDA_VERSION }} - EXTRA_LIBRARIES=${{ matrix.EXTRA_LIBRARIES }} - LIBCUDNN_PACKAGE=${{ matrix.LIBCUDNN_PACKAGE }} - context: docker/cuda - labels: ${{ steps.meta.outputs.labels }} - push: true - tags: ${{ steps.meta.outputs.tags }} - provenance: false - - build-py-ext: - needs: build-py - runs-on: ubuntu-latest - strategy: - fail-fast: true - matrix: - include: - - EXTENSION: vnc - PYTHON_VERSION: "3.10" - - EXTENSION: vnc - PYTHON_VERSION: "3.11" - - EXTENSION: batch - PYTHON_VERSION: "3.10" - steps: - - name: Docker Login - uses: docker/login-action@v3 - 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 - - name: Set up QEMU - uses: docker/setup-qemu-action@v3.2.0 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - name: Docker meta - id: meta - uses: docker/metadata-action@v5 - with: - images: ${{ env.DOCKER_PREFIX }}-${{ matrix.EXTENSION }} - tags: | - 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@v6 - with: - build-args: | - 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 - tags: ${{ steps.meta.outputs.tags }} - cache-from: type=gha - provenance: false - platforms: linux/amd64,linux/arm64 - - build-matlab-ext: - needs: build-py - runs-on: ubuntu-latest - strategy: - fail-fast: true - matrix: - include: - - EXTENSION: matlab-jupyter - PYTHON_VERSION: "3.10" - - EXTENSION: matlab-jupyter - PYTHON_VERSION: "3.11" - 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 - - name: Set up QEMU - uses: docker/setup-qemu-action@v3.2.0 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - name: Docker meta - id: meta - uses: docker/metadata-action@v5 - with: - images: ${{ env.DOCKER_PREFIX }}-${{ matrix.EXTENSION }} - tags: | - 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@v6 - with: - build-args: | - 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 - tags: ${{ steps.meta.outputs.tags }} - cache-from: type=gha - provenance: false - platforms: linux/amd64 - - build-vnc-ext: - needs: build-py-ext - runs-on: ubuntu-latest - strategy: - fail-fast: true - matrix: - VNC-EXTENSION: - - matlab - - qgis - steps: - - name: Docker Login - uses: docker/login-action@v3 - with: - username: ${{ secrets.RENKU_DOCKER_USERNAME }} - password: ${{ secrets.RENKU_DOCKER_PASSWORD }} - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - 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: Docker meta - id: meta - uses: docker/metadata-action@v5 - with: - images: ${{ env.DOCKER_PREFIX }}-${{ matrix.VNC-EXTENSION }} - tags: | - type=sha,prefix= - type=semver,pattern={{version}},prefix= - type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' }},prefix= - - name: Build and push - uses: docker/build-push-action@v6 - with: - build-args: | - 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 - tags: ${{ steps.meta.outputs.tags }} - cache-from: type=gha - provenance: false - - build-julia-ext: - needs: build-py - runs-on: ubuntu-latest - - strategy: - fail-fast: true - matrix: - include: - - JULIA_VERSION: "1.7.1" - JULIA_CHECKSUM: "44658e9c7b45e2b9b5b59239d190cca42de05c175ea86bc346c294a8fe8d9f11" - - JULIA_VERSION: "1.8.5" - JULIA_CHECKSUM: "e71a24816e8fe9d5f4807664cbbb42738f5aa9fe05397d35c81d4c5d649b9d05" - - JULIA_VERSION: "1.9.0" - JULIA_CHECKSUM: "00c614466ef9809c2eb23480e38d196a2c577fff2730c4f83d135b913d473359" - - steps: - - name: Docker Login - uses: docker/login-action@v3 - with: - username: ${{ secrets.RENKU_DOCKER_USERNAME }} - password: ${{ secrets.RENKU_DOCKER_PASSWORD }} - - - uses: actions/checkout@v4 - - name: Set up QEMU - uses: docker/setup-qemu-action@v3.2.0 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - 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: Docker meta - id: meta - uses: docker/metadata-action@v5 - with: - images: ${{ env.DOCKER_PREFIX }}-julia - tags: | - type=sha,prefix=${{ matrix.JULIA_VERSION }}- - type=semver,pattern={{version}},prefix=${{ matrix.JULIA_VERSION }}- - type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' && matrix.JULIA_VERSION == '1.9.0' }} - - name: Build and load - uses: docker/build-push-action@v6 - with: - build-args: | - RENKU_BASE=${{ steps.vars.outputs.renku_base }} - JULIA_VERSION_ARG=${{ matrix.JULIA_VERSION }} - JULIA_CHECKSUM=${{ matrix.JULIA_CHECKSUM }} - context: docker/julia - labels: ${{ steps.meta.outputs.labels }} - load: true - tags: ${{ steps.meta.outputs.tags }} - cache-from: type=gha - cache-to: type=gha - provenance: false - - name: Image Acceptance Tests - uses: cypress-io/github-action@v6 - env: - TEST_IMAGE_NAME: ${DOCKER_PREFIX}-julia:${{ matrix.JULIA_VERSION }}-${{ steps.vars.outputs.sha_short }} - TEST_USER_NAME: jovyan - TEST_SPEC: jupyterlab.cy.ts - with: - working-directory: tests - command: npx mocha -r ts-node/register index.ts - - name: Build and push - uses: docker/build-push-action@v6 - with: - build-args: | - RENKU_BASE=${{ steps.vars.outputs.renku_base }} - context: docker/julia - labels: ${{ steps.meta.outputs.labels }} - push: true - tags: ${{ steps.meta.outputs.tags }} - cache-from: type=gha - provenance: false - - build-r-ubuntu: - needs: build-py - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - include: - - RVERSION: 4.1.0 - BASE_IMAGE_NAME: rocker/verse - EXTENSION: r - RSTUDIO_VERSION: 2023.03.2+454 - - RVERSION: 4.1.1 - BASE_IMAGE_NAME: rocker/verse - EXTENSION: r - RSTUDIO_VERSION: 2023.03.2+454 - - RVERSION: 4.1.2 - BASE_IMAGE_NAME: rocker/verse - EXTENSION: r - RSTUDIO_VERSION: 2023.03.2+454 - - RVERSION: 4.2.0 - BASE_IMAGE_NAME: rocker/verse - EXTENSION: r - RSTUDIO_VERSION: 2023.03.2+454 - - RVERSION: 4.2.3 - BASE_IMAGE_NAME: rocker/verse - EXTENSION: r - RSTUDIO_VERSION: 2023.03.2+454 - - RVERSION: 4.3.1 - BASE_IMAGE_NAME: rocker/verse - EXTENSION: r - RSTUDIO_VERSION: 2023.12.1+402 - - RVERSION: devel - BASE_IMAGE_NAME: rocker/verse - EXTENSION: r - RSTUDIO_VERSION: 2023.12.1+402 - - RVERSION: RELEASE_3_14 - BASE_IMAGE_NAME: bioconductor/bioconductor_docker - EXTENSION: bioc - RSTUDIO_VERSION: 2023.03.2+454 - - RVERSION: RELEASE_3_15 - BASE_IMAGE_NAME: bioconductor/bioconductor_docker - EXTENSION: bioc - RSTUDIO_VERSION: 2023.03.2+454 - - RVERSION: RELEASE_3_16 - BASE_IMAGE_NAME: bioconductor/bioconductor_docker - EXTENSION: bioc - RSTUDIO_VERSION: 2023.12.1+402 - - RVERSION: RELEASE_3_17 - BASE_IMAGE_NAME: bioconductor/bioconductor_docker - EXTENSION: bioc - RSTUDIO_VERSION: 2023.12.1+402 - - RVERSION: RELEASE_3_18 - BASE_IMAGE_NAME: bioconductor/bioconductor_docker - EXTENSION: bioc - RSTUDIO_VERSION: 2023.12.1+402 - # NOTE: The devel version of bioconductor uses unstable R so it often breaks or fails to build - # - RVERSION: devel - # BASE_IMAGE_NAME: bioconductor/bioconductor_docker - # EXTENSION: bioc - steps: - - name: Docker Login - uses: docker/login-action@v3 - with: - username: ${{ secrets.RENKU_DOCKER_USERNAME }} - password: ${{ secrets.RENKU_DOCKER_PASSWORD }} - - - uses: actions/checkout@v4 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - 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: Docker meta - id: meta - uses: docker/metadata-action@v5 - with: - images: ${{ env.DOCKER_PREFIX }}-${{ matrix.EXTENSION }} - tags: | - type=sha,prefix=${{ matrix.RVERSION }}- - type=semver,pattern={{version}},prefix=${{ matrix.RVERSION }}- - type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' && matrix.RVERSION == 'devel' }} - - name: Clean cache - run: | - df -h - rm -rf /opt/hostedtoolcache/* - df -h - - name: Build and load - uses: docker/build-push-action@v6 - with: - build-args: | - RENKU_BASE=${{ steps.vars.outputs.renku_base }} - BASE_IMAGE=${{ matrix.BASE_IMAGE_NAME }}:${{ matrix.RVERSION }} - RSTUDIO_VERSION_OVERRIDE=${{ matrix.RSTUDIO_VERSION }} - context: docker/r - labels: ${{ steps.meta.outputs.labels }} - load: true - tags: ${{ steps.meta.outputs.tags }} - cache-from: type=gha - provenance: false - - name: Image Acceptance Tests - uses: cypress-io/github-action@v6 - env: - TEST_IMAGE_NAME: ${{ env.DOCKER_PREFIX }}-${{ matrix.EXTENSION }}:${{ matrix.RVERSION }}-${{ steps.vars.outputs.sha_short }} - TEST_ENV: rstudio - TEST_USER_NAME: rstudio - TEST_SPEC: rstudio.cy.ts - with: - working-directory: tests - start: docker images - command: npx mocha -r ts-node/register index.ts - - name: Build and push - uses: docker/build-push-action@v6 - with: - build-args: | - RENKU_BASE=${{ steps.vars.outputs.renku_base }} - BASE_IMAGE=${{ matrix.BASE_IMAGE_NAME }}:${{ matrix.RVERSION }} - RSTUDIO_VERSION_OVERRIDE=${{ matrix.RSTUDIO_VERSION }} - context: docker/r - labels: ${{ steps.meta.outputs.labels }} - push: true - tags: ${{ steps.meta.outputs.tags }} - cache-from: type=gha - provenance: false + # build-py: + # needs: lint + # runs-on: ubuntu-latest + # + # strategy: + # fail-fast: true + # matrix: + # 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: docker/login-action@v3 + # with: + # username: ${{ secrets.RENKU_DOCKER_USERNAME }} + # password: ${{ secrets.RENKU_DOCKER_PASSWORD }} + # - uses: actions/checkout@v4 + # - name: Set up QEMU + # uses: docker/setup-qemu-action@v3.2.0 + # - name: Set up Docker Buildx + # uses: docker/setup-buildx-action@v3 + # - name: Docker meta + # id: meta + # uses: docker/metadata-action@v5 + # with: + # images: ${{ env.DOCKER_PREFIX }}-py + # tags: | + # type=sha,prefix=${{ matrix.BASE_PYTHON_VERSION }}- + # - name: Build and load + # uses: docker/build-push-action@v6 + # with: + # build-args: | + # 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 + # labels: ${{ steps.meta.outputs.labels }} + # load: true + # tags: ${{ steps.meta.outputs.tags }} + # provenance: false + # - name: Image Acceptance Tests + # uses: cypress-io/github-action@v6 + # env: + # TEST_IMAGE_NAME: ${{ env.DOCKER_PREFIX }}-py:${{ steps.meta.outputs.version }} + # TEST_USER_NAME: jovyan + # TEST_SPEC: jupyterlab.cy.ts + # with: + # working-directory: tests + # command: npx mocha -r ts-node/register index.ts + # # export the base images for other jobs to use + # - name: Build and export + # uses: docker/build-push-action@v6 + # with: + # build-args: | + # BASE_IMAGE=${{ matrix.REGISTRY }}/jupyter/base-notebook:python-${{ matrix.BASE_PYTHON_VERSION }} + # cache-from: type=gha + # context: docker/py + # labels: ${{ steps.meta.outputs.labels }} + # push: true + # tags: ${{ steps.meta.outputs.tags }} + # provenance: false + # + # build-py-homedir-env: + # needs: lint + # runs-on: ubuntu-latest + # + # strategy: + # fail-fast: true + # matrix: + # BASE_PYTHON_VERSION: + # - "3.10" + # - "3.9" + # - "3.8" + # steps: + # - name: Docker Login + # uses: docker/login-action@v3 + # with: + # username: ${{ secrets.RENKU_DOCKER_USERNAME }} + # password: ${{ secrets.RENKU_DOCKER_PASSWORD }} + # - uses: actions/checkout@v4 + # - name: Set up QEMU + # uses: docker/setup-qemu-action@v3.2.0 + # - name: Set up Docker Buildx + # uses: docker/setup-buildx-action@v3 + # - name: Docker meta + # id: meta + # uses: docker/metadata-action@v5 + # with: + # images: ${{ env.DOCKER_PREFIX }}-py-homedir-envs + # tags: | + # type=sha,prefix=${{ matrix.BASE_PYTHON_VERSION }}- + # type=semver,pattern={{version}},prefix=${{ matrix.BASE_PYTHON_VERSION }}- + # type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' && matrix.BASE_PYTHON_VERSION == env.DEFAULT_PYTHON_VERSION }} + # - name: Build and load + # uses: docker/build-push-action@v6 + # with: + # build-args: | + # BASE_IMAGE=jupyter/base-notebook:python-${{ matrix.BASE_PYTHON_VERSION }} + # CONDA_ENVS_DIRS=/home/jovyan/work/envs + # cache-from: type=gha + # cache-to: type=gha,mode=max + # context: docker/py + # labels: ${{ steps.meta.outputs.labels }} + # load: true + # tags: ${{ steps.meta.outputs.tags }} + # provenance: false + # - name: Image Acceptance Tests + # uses: cypress-io/github-action@v6 + # env: + # TEST_IMAGE_NAME: ${{ env.DOCKER_PREFIX }}-py-homedir-envs:${{ steps.meta.outputs.version }} + # TEST_USER_NAME: jovyan + # TEST_SPEC: jupyterlab.cy.ts + # with: + # working-directory: tests + # command: npx mocha -r ts-node/register index.ts + # # export the default base image for other jobs to use + # - name: Build and export + # if: matrix.BASE_PYTHON_VERSION == env.DEFAULT_PYTHON_VERSION + # uses: docker/build-push-action@v6 + # with: + # build-args: | + # BASE_IMAGE=jupyter/base-notebook:python-${{ matrix.BASE_PYTHON_VERSION }} + # CONDA_ENVS_DIRS=/home/jovyan/work/envs + # cache-from: type=gha + # context: docker/py + # labels: ${{ steps.meta.outputs.labels }} + # push: true + # tags: ${{ steps.meta.outputs.tags }} + # provenance: false + # + # build-py-multiarch: + # needs: build-py + # runs-on: ubuntu-latest + # + # strategy: + # fail-fast: true + # matrix: + # 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: docker/login-action@v3 + # with: + # username: ${{ secrets.RENKU_DOCKER_USERNAME }} + # password: ${{ secrets.RENKU_DOCKER_PASSWORD }} + # - uses: actions/checkout@v4 + # - name: Set up QEMU + # uses: docker/setup-qemu-action@v3.2.0 + # - name: Set up Docker Buildx + # uses: docker/setup-buildx-action@v3 + # - name: Docker meta + # id: meta + # uses: docker/metadata-action@v5 + # with: + # images: ${{ env.DOCKER_PREFIX }}-py + # tags: | + # type=sha,prefix=${{ matrix.BASE_PYTHON_VERSION }}- + # type=semver,pattern={{version}},prefix=${{ matrix.BASE_PYTHON_VERSION }}- + # type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' && matrix.BASE_PYTHON_VERSION == env.DEFAULT_PYTHON_VERSION }} + # - name: Build and push + # uses: docker/build-push-action@v6 + # with: + # context: docker/py + # push: true + # tags: ${{ steps.meta.outputs.tags }} + # labels: ${{ steps.meta.outputs.labels }} + # cache-to: type=gha,mode=max + # cache-from: type=gha + # build-args: | + # BASE_IMAGE=${{ matrix.REGISTRY }}/jupyter/base-notebook:python-${{ matrix.BASE_PYTHON_VERSION }} + # platforms: linux/amd64,linux/arm64 + # provenance: false + # + # build-cuda: + # needs: build-py + # runs-on: ubuntu-latest + # + # strategy: + # fail-fast: true + # matrix: + # include: + # # taken from tensorflow compatibility chart at https://www.tensorflow.org/install/source#gpu + # - CUDA_VERSION: "11.2" + # EXTRA_LIBRARIES: "" + # CUDA_CUDART_PACKAGE: "cuda-cudart-11-2=11.2.152-1" + # CUDA_COMPAT_PACKAGE: "cuda-compat-11-2" + # LIBCUDNN_PACKAGE: "libcudnn8=8.1.1.33-1+cuda11.2" + # - CUDA_VERSION: "11.3" + # EXTRA_LIBRARIES: "" + # CUDA_CUDART_PACKAGE: "cuda-cudart-11-3=11.3.109-1" + # CUDA_COMPAT_PACKAGE: "cuda-compat-11-3" + # LIBCUDNN_PACKAGE: "libcudnn8=8.2.1.32-1+cuda11.3" + # - CUDA_VERSION: "11.4" + # EXTRA_LIBRARIES: "" + # CUDA_CUDART_PACKAGE: "cuda-cudart-11-4=11.4.148-1" + # CUDA_COMPAT_PACKAGE: "cuda-compat-11-4" + # LIBCUDNN_PACKAGE: "libcudnn8=8.2.4.15-1+cuda11.4" + # - CUDA_VERSION: "11.5" + # EXTRA_LIBRARIES: "" + # CUDA_CUDART_PACKAGE: "cuda-cudart-11-5=11.5.117-1" + # CUDA_COMPAT_PACKAGE: "cuda-compat-11-5" + # LIBCUDNN_PACKAGE: "libcudnn8=8.3.2.44-1+cuda11.5" + # - CUDA_VERSION: "11.7" + # EXTRA_LIBRARIES: "" + # CUDA_CUDART_PACKAGE: "cuda-cudart-11-7=11.7.60-1" + # CUDA_COMPAT_PACKAGE: "cuda-compat-11-7" + # LIBCUDNN_PACKAGE: "libcudnn8=8.5.0.96-1+cuda11.7" + # - CUDA_VERSION: "11.8" + # EXTRA_LIBRARIES: "" + # CUDA_CUDART_PACKAGE: "cuda-cudart-11-8=11.8.89-1" + # CUDA_COMPAT_PACKAGE: "cuda-compat-11-8" + # LIBCUDNN_PACKAGE: "libcudnn8=8.6.0.163-1+cuda11.8" + # ADD_2204_APT_REPOS: "true" + # - CUDA_VERSION: "12.2" + # EXTRA_LIBRARIES: "" + # CUDA_CUDART_PACKAGE: "cuda-cudart-12-2=12.2.140-1" + # CUDA_COMPAT_PACKAGE: "cuda-compat-12-2" + # LIBCUDNN_PACKAGE: "libcudnn8=8.9.5.29-1+cuda12.2" + # ADD_2204_APT_REPOS: "true" + # steps: + # - name: Docker Login + # uses: docker/login-action@v3 + # 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 Docker Buildx + # uses: docker/setup-buildx-action@v3 + # - name: Docker meta + # id: meta + # uses: docker/metadata-action@v5 + # with: + # images: ${{ env.DOCKER_PREFIX }}-cuda + # tags: | + # type=sha,prefix=${{ matrix.CUDA_VERSION }}- + # type=semver,pattern={{version}},prefix=${{ matrix.CUDA_VERSION }}- + # type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' && matrix.CUDA_VERSION == '11.7' }} + # - name: Build and load + # uses: docker/build-push-action@v6 + # with: + # build-args: | + # RENKU_BASE=${{ steps.vars.outputs.renku_base }} + # CUDA_COMPAT_PACKAGE=${{ matrix.CUDA_COMPAT_PACKAGE }} + # CUDA_CUDART_PACKAGE=${{ matrix.CUDA_CUDART_PACKAGE }} + # CUDA_VERSION=${{ matrix.CUDA_VERSION }} + # EXTRA_LIBRARIES=${{ matrix.EXTRA_LIBRARIES }} + # LIBCUDNN_PACKAGE=${{ matrix.LIBCUDNN_PACKAGE }} + # ADD_2204_APT_REPOS=${{ matrix.ADD_2204_APT_REPOS }} + # context: docker/cuda + # labels: ${{ steps.meta.outputs.labels }} + # load: true + # tags: ${{ steps.meta.outputs.tags }} + # cache-from: | + # type=inline + # type=registry,ref=${{ steps.vars.outputs.renku_base }} + # provenance: false + # - name: Image Acceptance Tests + # uses: cypress-io/github-action@v6 + # env: + # TEST_IMAGE_NAME: ${{ env.DOCKER_PREFIX }}-cuda:${{ steps.meta.outputs.version }} + # TEST_USER_NAME: jovyan + # TEST_SPEC: jupyterlab.cy.ts + # with: + # working-directory: tests + # command: npx mocha -r ts-node/register index.ts + # - name: Build and push + # uses: docker/build-push-action@v6 + # with: + # build-args: | + # RENKU_BASE=${{ steps.vars.outputs.renku_base }} + # CUDA_COMPAT_PACKAGE=${{ matrix.CUDA_COMPAT_PACKAGE }} + # CUDA_CUDART_PACKAGE=${{ matrix.CUDA_CUDART_PACKAGE }} + # CUDA_VERSION=${{ matrix.CUDA_VERSION }} + # EXTRA_LIBRARIES=${{ matrix.EXTRA_LIBRARIES }} + # LIBCUDNN_PACKAGE=${{ matrix.LIBCUDNN_PACKAGE }} + # context: docker/cuda + # labels: ${{ steps.meta.outputs.labels }} + # push: true + # tags: ${{ steps.meta.outputs.tags }} + # provenance: false + # + # build-py-ext: + # needs: build-py + # runs-on: ubuntu-latest + # strategy: + # fail-fast: true + # matrix: + # include: + # - EXTENSION: vnc + # PYTHON_VERSION: "3.10" + # - EXTENSION: vnc + # PYTHON_VERSION: "3.11" + # - EXTENSION: batch + # PYTHON_VERSION: "3.10" + # steps: + # - name: Docker Login + # uses: docker/login-action@v3 + # 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 + # - name: Set up QEMU + # uses: docker/setup-qemu-action@v3.2.0 + # - name: Set up Docker Buildx + # uses: docker/setup-buildx-action@v3 + # - name: Docker meta + # id: meta + # uses: docker/metadata-action@v5 + # with: + # images: ${{ env.DOCKER_PREFIX }}-${{ matrix.EXTENSION }} + # tags: | + # 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@v6 + # with: + # build-args: | + # 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 + # tags: ${{ steps.meta.outputs.tags }} + # cache-from: type=gha + # provenance: false + # platforms: linux/amd64,linux/arm64 + # + # build-matlab-ext: + # needs: build-py + # runs-on: ubuntu-latest + # strategy: + # fail-fast: true + # matrix: + # include: + # - EXTENSION: matlab-jupyter + # PYTHON_VERSION: "3.10" + # - EXTENSION: matlab-jupyter + # PYTHON_VERSION: "3.11" + # 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 + # - name: Set up QEMU + # uses: docker/setup-qemu-action@v3.2.0 + # - name: Set up Docker Buildx + # uses: docker/setup-buildx-action@v3 + # - name: Docker meta + # id: meta + # uses: docker/metadata-action@v5 + # with: + # images: ${{ env.DOCKER_PREFIX }}-${{ matrix.EXTENSION }} + # tags: | + # 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@v6 + # with: + # build-args: | + # 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 + # tags: ${{ steps.meta.outputs.tags }} + # cache-from: type=gha + # provenance: false + # platforms: linux/amd64 + # + # build-vnc-ext: + # needs: build-py-ext + # runs-on: ubuntu-latest + # strategy: + # fail-fast: true + # matrix: + # VNC-EXTENSION: + # - matlab + # - qgis + # steps: + # - name: Docker Login + # uses: docker/login-action@v3 + # with: + # username: ${{ secrets.RENKU_DOCKER_USERNAME }} + # password: ${{ secrets.RENKU_DOCKER_PASSWORD }} + # - name: Set up Docker Buildx + # uses: docker/setup-buildx-action@v3 + # - 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: Docker meta + # id: meta + # uses: docker/metadata-action@v5 + # with: + # images: ${{ env.DOCKER_PREFIX }}-${{ matrix.VNC-EXTENSION }} + # tags: | + # type=sha,prefix= + # type=semver,pattern={{version}},prefix= + # type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' }},prefix= + # - name: Build and push + # uses: docker/build-push-action@v6 + # with: + # build-args: | + # 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 + # tags: ${{ steps.meta.outputs.tags }} + # cache-from: type=gha + # provenance: false + # + # build-julia-ext: + # needs: build-py + # runs-on: ubuntu-latest + # + # strategy: + # fail-fast: true + # matrix: + # include: + # - JULIA_VERSION: "1.7.1" + # JULIA_CHECKSUM: "44658e9c7b45e2b9b5b59239d190cca42de05c175ea86bc346c294a8fe8d9f11" + # - JULIA_VERSION: "1.8.5" + # JULIA_CHECKSUM: "e71a24816e8fe9d5f4807664cbbb42738f5aa9fe05397d35c81d4c5d649b9d05" + # - JULIA_VERSION: "1.9.0" + # JULIA_CHECKSUM: "00c614466ef9809c2eb23480e38d196a2c577fff2730c4f83d135b913d473359" + # + # steps: + # - name: Docker Login + # uses: docker/login-action@v3 + # with: + # username: ${{ secrets.RENKU_DOCKER_USERNAME }} + # password: ${{ secrets.RENKU_DOCKER_PASSWORD }} + # + # - uses: actions/checkout@v4 + # - name: Set up QEMU + # uses: docker/setup-qemu-action@v3.2.0 + # - name: Set up Docker Buildx + # uses: docker/setup-buildx-action@v3 + # - 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: Docker meta + # id: meta + # uses: docker/metadata-action@v5 + # with: + # images: ${{ env.DOCKER_PREFIX }}-julia + # tags: | + # type=sha,prefix=${{ matrix.JULIA_VERSION }}- + # type=semver,pattern={{version}},prefix=${{ matrix.JULIA_VERSION }}- + # type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' && matrix.JULIA_VERSION == '1.9.0' }} + # - name: Build and load + # uses: docker/build-push-action@v6 + # with: + # build-args: | + # RENKU_BASE=${{ steps.vars.outputs.renku_base }} + # JULIA_VERSION_ARG=${{ matrix.JULIA_VERSION }} + # JULIA_CHECKSUM=${{ matrix.JULIA_CHECKSUM }} + # context: docker/julia + # labels: ${{ steps.meta.outputs.labels }} + # load: true + # tags: ${{ steps.meta.outputs.tags }} + # cache-from: type=gha + # cache-to: type=gha + # provenance: false + # - name: Image Acceptance Tests + # uses: cypress-io/github-action@v6 + # env: + # TEST_IMAGE_NAME: ${DOCKER_PREFIX}-julia:${{ matrix.JULIA_VERSION }}-${{ steps.vars.outputs.sha_short }} + # TEST_USER_NAME: jovyan + # TEST_SPEC: jupyterlab.cy.ts + # with: + # working-directory: tests + # command: npx mocha -r ts-node/register index.ts + # - name: Build and push + # uses: docker/build-push-action@v6 + # with: + # build-args: | + # RENKU_BASE=${{ steps.vars.outputs.renku_base }} + # context: docker/julia + # labels: ${{ steps.meta.outputs.labels }} + # push: true + # tags: ${{ steps.meta.outputs.tags }} + # cache-from: type=gha + # provenance: false + # + # build-r-ubuntu: + # needs: build-py + # runs-on: ubuntu-latest + # strategy: + # fail-fast: false + # matrix: + # include: + # - RVERSION: 4.1.0 + # BASE_IMAGE_NAME: rocker/verse + # EXTENSION: r + # RSTUDIO_VERSION: 2023.03.2+454 + # - RVERSION: 4.1.1 + # BASE_IMAGE_NAME: rocker/verse + # EXTENSION: r + # RSTUDIO_VERSION: 2023.03.2+454 + # - RVERSION: 4.1.2 + # BASE_IMAGE_NAME: rocker/verse + # EXTENSION: r + # RSTUDIO_VERSION: 2023.03.2+454 + # - RVERSION: 4.2.0 + # BASE_IMAGE_NAME: rocker/verse + # EXTENSION: r + # RSTUDIO_VERSION: 2023.03.2+454 + # - RVERSION: 4.2.3 + # BASE_IMAGE_NAME: rocker/verse + # EXTENSION: r + # RSTUDIO_VERSION: 2023.03.2+454 + # - RVERSION: 4.3.1 + # BASE_IMAGE_NAME: rocker/verse + # EXTENSION: r + # RSTUDIO_VERSION: 2023.12.1+402 + # - RVERSION: devel + # BASE_IMAGE_NAME: rocker/verse + # EXTENSION: r + # RSTUDIO_VERSION: 2023.12.1+402 + # - RVERSION: RELEASE_3_14 + # BASE_IMAGE_NAME: bioconductor/bioconductor_docker + # EXTENSION: bioc + # RSTUDIO_VERSION: 2023.03.2+454 + # - RVERSION: RELEASE_3_15 + # BASE_IMAGE_NAME: bioconductor/bioconductor_docker + # EXTENSION: bioc + # RSTUDIO_VERSION: 2023.03.2+454 + # - RVERSION: RELEASE_3_16 + # BASE_IMAGE_NAME: bioconductor/bioconductor_docker + # EXTENSION: bioc + # RSTUDIO_VERSION: 2023.12.1+402 + # - RVERSION: RELEASE_3_17 + # BASE_IMAGE_NAME: bioconductor/bioconductor_docker + # EXTENSION: bioc + # RSTUDIO_VERSION: 2023.12.1+402 + # - RVERSION: RELEASE_3_18 + # BASE_IMAGE_NAME: bioconductor/bioconductor_docker + # EXTENSION: bioc + # RSTUDIO_VERSION: 2023.12.1+402 + # # NOTE: The devel version of bioconductor uses unstable R so it often breaks or fails to build + # # - RVERSION: devel + # # BASE_IMAGE_NAME: bioconductor/bioconductor_docker + # # EXTENSION: bioc + # steps: + # - name: Docker Login + # uses: docker/login-action@v3 + # with: + # username: ${{ secrets.RENKU_DOCKER_USERNAME }} + # password: ${{ secrets.RENKU_DOCKER_PASSWORD }} + # + # - uses: actions/checkout@v4 + # - name: Set up Docker Buildx + # uses: docker/setup-buildx-action@v3 + # - 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: Docker meta + # id: meta + # uses: docker/metadata-action@v5 + # with: + # images: ${{ env.DOCKER_PREFIX }}-${{ matrix.EXTENSION }} + # tags: | + # type=sha,prefix=${{ matrix.RVERSION }}- + # type=semver,pattern={{version}},prefix=${{ matrix.RVERSION }}- + # type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' && matrix.RVERSION == 'devel' }} + # - name: Clean cache + # run: | + # df -h + # rm -rf /opt/hostedtoolcache/* + # df -h + # - name: Build and load + # uses: docker/build-push-action@v6 + # with: + # build-args: | + # RENKU_BASE=${{ steps.vars.outputs.renku_base }} + # BASE_IMAGE=${{ matrix.BASE_IMAGE_NAME }}:${{ matrix.RVERSION }} + # RSTUDIO_VERSION_OVERRIDE=${{ matrix.RSTUDIO_VERSION }} + # context: docker/r + # labels: ${{ steps.meta.outputs.labels }} + # load: true + # tags: ${{ steps.meta.outputs.tags }} + # cache-from: type=gha + # provenance: false + # - name: Image Acceptance Tests + # uses: cypress-io/github-action@v6 + # env: + # TEST_IMAGE_NAME: ${{ env.DOCKER_PREFIX }}-${{ matrix.EXTENSION }}:${{ matrix.RVERSION }}-${{ steps.vars.outputs.sha_short }} + # TEST_ENV: rstudio + # TEST_USER_NAME: rstudio + # TEST_SPEC: rstudio.cy.ts + # with: + # working-directory: tests + # start: docker images + # command: npx mocha -r ts-node/register index.ts + # - name: Build and push + # uses: docker/build-push-action@v6 + # with: + # build-args: | + # RENKU_BASE=${{ steps.vars.outputs.renku_base }} + # BASE_IMAGE=${{ matrix.BASE_IMAGE_NAME }}:${{ matrix.RVERSION }} + # RSTUDIO_VERSION_OVERRIDE=${{ matrix.RSTUDIO_VERSION }} + # context: docker/r + # labels: ${{ steps.meta.outputs.labels }} + # push: true + # tags: ${{ steps.meta.outputs.tags }} + # cache-from: type=gha + # provenance: false build-vscode-base: needs: lint From 924b08f78c45b31c077333938adf63f76b6d213e Mon Sep 17 00:00:00 2001 From: Tasko Olevski Date: Fri, 22 Nov 2024 15:37:27 +0100 Subject: [PATCH 03/20] squashme: minor fixes --- .github/workflows/build-and-push-to-docker.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-and-push-to-docker.yml b/.github/workflows/build-and-push-to-docker.yml index 4b9f6951..0f961d1a 100644 --- a/.github/workflows/build-and-push-to-docker.yml +++ b/.github/workflows/build-and-push-to-docker.yml @@ -42,10 +42,10 @@ jobs: - docker/julia/Dockerfile - docker/batch/Dockerfile - docker/qgis/Dockerfile - - docker/vscodium/base.Dockerfile - - docker/vscodium/conda.Dockerfile - - docker/vscodium/poetry.Dockerfile - - docker/vscodium/R.Dockerfile + - docker/vscode/base.Dockerfile + - docker/vscode/conda.Dockerfile + - docker/vscode/poetry.Dockerfile + - docker/vscode/R.Dockerfile runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 From 4b7ab434d8f236d16015ed58fe6733edd8da97e5 Mon Sep 17 00:00:00 2001 From: Tasko Olevski Date: Fri, 22 Nov 2024 15:48:13 +0100 Subject: [PATCH 04/20] fix: linting --- docker/vscode/R.Dockerfile | 11 ++++++----- docker/vscode/base.Dockerfile | 3 ++- docker/vscode/conda.Dockerfile | 3 ++- docker/vscode/poetry.Dockerfile | 3 ++- 4 files changed, 12 insertions(+), 8 deletions(-) diff --git a/docker/vscode/R.Dockerfile b/docker/vscode/R.Dockerfile index 022b9c80..4c011471 100644 --- a/docker/vscode/R.Dockerfile +++ b/docker/vscode/R.Dockerfile @@ -4,15 +4,16 @@ ARG R_VERSION=4.4.2 ARG SESSION_USER=vscode ARG WORKDIR=/home/${SESSION_USER}/work +SHELL [ "/bin/bash", "-c", "-o", "pipefail" ] USER root # From https://docs.posit.co/resources/install-r.html RUN curl -O https://cdn.rstudio.com/r/debian-12/pkgs/r-${R_VERSION}_1_amd64.deb \ && apt-get update \ - && apt-get install -y ./r-${R_VERSION}_1_amd64.deb \ + && apt-get install -y --no-install-recommends ./r-${R_VERSION}_1_amd64.deb \ && rm -rf /var/lib/apt/lists/* \ && rm -rf ./r-${R_VERSION}_1_amd64.deb \ - && sudo ln -s /opt/R/${R_VERSION}/bin/R /usr/local/bin/R \ - && sudo ln -s /opt/R/${R_VERSION}/bin/Rscript /usr/local/bin/Rscript + && ln -s /opt/R/${R_VERSION}/bin/R /usr/local/bin/R \ + && ln -s /opt/R/${R_VERSION}/bin/Rscript /usr/local/bin/Rscript USER ${SESSION_USER} WORKDIR ${WORKDIR} @@ -21,5 +22,5 @@ WORKDIR ${WORKDIR} # The .Rprofile changes allow R to be able to use precompiled packages # See https://packagemanager.posit.co/client/#/repos/cran/setup RUN mkdir -p ${WORKDIR}/.rlibs \ - && echo "\nR_LIBS_SITE=\"${WORKDIR}/.rlibs\"\n" >> /home/${SESSION_USER}/.Renviron \ - && echo "\noptions(repos = c(CRAN = \"https://packagemanager.posit.co/cran/__linux__/bookworm/latest\"))\n" >> /home/${SESSION_USER}/.Rprofile + && printf "\nR_LIBS_SITE=\"%s/.rlibs\"\n" "${WORKDIR}" >> /home/${SESSION_USER}/.Renviron \ + && printf "\noptions(repos = c(CRAN = \"https://packagemanager.posit.co/cran/__linux__/bookworm/latest\"))\n" >> /home/${SESSION_USER}/.Rprofile diff --git a/docker/vscode/base.Dockerfile b/docker/vscode/base.Dockerfile index fcc82b1c..498d5ef8 100644 --- a/docker/vscode/base.Dockerfile +++ b/docker/vscode/base.Dockerfile @@ -2,8 +2,9 @@ ARG BASE_IMAGE=mcr.microsoft.com/devcontainers/base:bookworm FROM $BASE_IMAGE ARG VSCODIUM_VERSION=1.95.2.24313 ARG SESSION_USER=vscode +SHELL [ "/bin/bash", "-c", "-o", "pipefail" ] RUN apt-get update && \ - apt-get install -y curl tini git-lfs && \ + apt-get install -y --no-install-recommends curl tini git-lfs && \ mkdir -p /codium-server && \ curl -L https://github.com/VSCodium/vscodium/releases/download/${VSCODIUM_VERSION}/vscodium-reh-web-linux-x64-${VSCODIUM_VERSION}.tar.gz | tar -xz -C /codium-server && \ rm -rf /var/lib/apt/lists/* diff --git a/docker/vscode/conda.Dockerfile b/docker/vscode/conda.Dockerfile index 6acd188a..00dd6dee 100644 --- a/docker/vscode/conda.Dockerfile +++ b/docker/vscode/conda.Dockerfile @@ -7,9 +7,10 @@ ARG SESSION_USER=vscode ARG WORKDIR=/home/${SESSION_USER}/work ARG VENVS_PATH=${WORKDIR}/.venvs ENV VENVS_PATH=${VENVS_PATH} +SHELL [ "/bin/bash", "-c", "-o", "pipefail" ] USER root RUN apt-get update && \ - apt-get install -y curl && \ + apt-get install -y curl --no-install-recommends && \ curl -L "https://github.com/conda-forge/miniforge/releases/download/${MINIFORGE_VERSION}/Miniforge3-${OS}-${ARCH}.sh" -o install.sh && \ rm -rf /var/lib/apt/lists/* diff --git a/docker/vscode/poetry.Dockerfile b/docker/vscode/poetry.Dockerfile index 30cc7476..d673907e 100644 --- a/docker/vscode/poetry.Dockerfile +++ b/docker/vscode/poetry.Dockerfile @@ -7,9 +7,10 @@ ARG POETRY_VERSION="" ARG SESSION_USER=vscode ARG WORKDIR=/home/${SESSION_USER}/work ARG VENVS_PATH=${WORKDIR}/.venvs +SHELL [ "/bin/bash", "-c", "-o", "pipefail" ] USER root RUN apt-get update && \ - apt-get install -y curl libz-dev libreadline-dev libncurses-dev libsqlite3-dev libssl-dev liblzma-dev libgdbm-dev libbz2-dev libffi-dev && \ + apt-get install -y --no-install-recommends curl libz-dev libreadline-dev libncurses-dev libsqlite3-dev libssl-dev liblzma-dev libgdbm-dev libbz2-dev libffi-dev && \ mkdir -p /python-build && \ curl -L https://github.com/pyenv/pyenv/archive/refs/tags/${PYENV_VERSION}.tar.gz | tar -xz -C /python-build && \ /bin/sh /python-build/*/plugins/python-build/install.sh && \ From 392947aeb5d027b8ca0aa47c65b48e5373e74587 Mon Sep 17 00:00:00 2001 From: Tasko Olevski Date: Fri, 22 Nov 2024 16:03:22 +0100 Subject: [PATCH 05/20] fix: set output step --- .../workflows/build-and-push-to-docker.yml | 36 +++++++++---------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/.github/workflows/build-and-push-to-docker.yml b/.github/workflows/build-and-push-to-docker.yml index 0f961d1a..aba4120c 100644 --- a/.github/workflows/build-and-push-to-docker.yml +++ b/.github/workflows/build-and-push-to-docker.yml @@ -760,18 +760,18 @@ jobs: - CONDA_VERSION: latest BASE_DEBIAN_VERSION: bookworm steps: - - 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}-vscode:${{ matrix.BASE_DEBIAN_VERSION }}-${sha_short}" >> $GITHUB_OUTPUT - name: Docker Login uses: docker/login-action@v3 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}-vscode:${{ matrix.BASE_DEBIAN_VERSION }}-${sha_short}" >> $GITHUB_OUTPUT - name: Set up QEMU uses: docker/setup-qemu-action@v3.2.0 - name: Set up Docker Buildx @@ -823,18 +823,18 @@ jobs: POETRY_VERSION: 1.8.4 LATEST: false steps: - - 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}-vscode:${{ matrix.BASE_DEBIAN_VERSION }}-${sha_short}" >> $GITHUB_OUTPUT - name: Docker Login uses: docker/login-action@v3 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}-vscode:${{ matrix.BASE_DEBIAN_VERSION }}-${sha_short}" >> $GITHUB_OUTPUT - name: Set up QEMU uses: docker/setup-qemu-action@v3.2.0 - name: Set up Docker Buildx @@ -880,18 +880,18 @@ jobs: - R_VERSION: 4.2.3 LATEST: false steps: - - 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}-vscode:${{ matrix.BASE_DEBIAN_VERSION }}-${sha_short}" >> $GITHUB_OUTPUT - name: Docker Login uses: docker/login-action@v3 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}-vscode:${{ matrix.BASE_DEBIAN_VERSION }}-${sha_short}" >> $GITHUB_OUTPUT - name: Set up QEMU uses: docker/setup-qemu-action@v3.2.0 - name: Set up Docker Buildx From bb63bfa9bf49c4fd46030b147d8c9f48d338042e Mon Sep 17 00:00:00 2001 From: Tasko Olevski Date: Fri, 22 Nov 2024 16:10:55 +0100 Subject: [PATCH 06/20] fix: R builds --- .github/workflows/build-and-push-to-docker.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/build-and-push-to-docker.yml b/.github/workflows/build-and-push-to-docker.yml index aba4120c..688c8d93 100644 --- a/.github/workflows/build-and-push-to-docker.yml +++ b/.github/workflows/build-and-push-to-docker.yml @@ -874,10 +874,13 @@ jobs: matrix: include: - R_VERSION: 4.4.2 + BASE_DEBIAN_VERSION: bookworm LATEST: true - R_VERSION: 4.3.3 + BASE_DEBIAN_VERSION: bookworm LATEST: false - R_VERSION: 4.2.3 + BASE_DEBIAN_VERSION: bookworm LATEST: false steps: - name: Docker Login From d46751a5c41453a393edc47dafecc7693eca8176 Mon Sep 17 00:00:00 2001 From: Tasko Olevski Date: Fri, 22 Nov 2024 16:19:51 +0100 Subject: [PATCH 07/20] fix: set workdir for base vscode image --- docker/vscode/base.Dockerfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docker/vscode/base.Dockerfile b/docker/vscode/base.Dockerfile index 498d5ef8..f37a4ac0 100644 --- a/docker/vscode/base.Dockerfile +++ b/docker/vscode/base.Dockerfile @@ -2,6 +2,7 @@ ARG BASE_IMAGE=mcr.microsoft.com/devcontainers/base:bookworm FROM $BASE_IMAGE ARG VSCODIUM_VERSION=1.95.2.24313 ARG SESSION_USER=vscode +ARG WORKDIR=/home/${SESSION_USER}/work SHELL [ "/bin/bash", "-c", "-o", "pipefail" ] RUN apt-get update && \ apt-get install -y --no-install-recommends curl tini git-lfs && \ @@ -10,5 +11,6 @@ RUN apt-get update && \ rm -rf /var/lib/apt/lists/* USER ${SESSION_USER} +WORKDIR ${WORKDIR} ENTRYPOINT ["tini", "--", "sh", "-c"] CMD ["/codium-server/bin/codium-server --server-base-path $RENKU_BASE_URL_PATH/ --without-connection-token --host 0.0.0.0 --port 8888"] From 9f5ab87a4b925494e684934b4ea38391917baf88 Mon Sep 17 00:00:00 2001 From: Tasko Olevski Date: Fri, 22 Nov 2024 17:45:53 +0100 Subject: [PATCH 08/20] fix: correct Dockerfile for R images --- .github/workflows/build-and-push-to-docker.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-and-push-to-docker.yml b/.github/workflows/build-and-push-to-docker.yml index 688c8d93..b531021d 100644 --- a/.github/workflows/build-and-push-to-docker.yml +++ b/.github/workflows/build-and-push-to-docker.yml @@ -917,7 +917,7 @@ jobs: cache-from: type=gha cache-to: type=gha,mode=max context: docker/vscode - file: docker/vscode/poetry.Dockerfile + file: docker/vscode/R.Dockerfile labels: ${{ steps.meta.outputs.labels }} push: true tags: ${{ steps.meta.outputs.tags }} From e9b3a578125cb9c62f229c24da3c196213ed4c10 Mon Sep 17 00:00:00 2001 From: Tasko Olevski Date: Sat, 23 Nov 2024 14:41:05 +0100 Subject: [PATCH 09/20] fix: save extensions in workdir --- docker/vscode/base.Dockerfile | 6 ++++-- docker/vscode/entrypoint.sh | 12 ++++++++++++ 2 files changed, 16 insertions(+), 2 deletions(-) create mode 100644 docker/vscode/entrypoint.sh diff --git a/docker/vscode/base.Dockerfile b/docker/vscode/base.Dockerfile index f37a4ac0..dae29ff6 100644 --- a/docker/vscode/base.Dockerfile +++ b/docker/vscode/base.Dockerfile @@ -11,6 +11,8 @@ RUN apt-get update && \ rm -rf /var/lib/apt/lists/* USER ${SESSION_USER} +COPY entrypoint.sh /entrypoint.sh WORKDIR ${WORKDIR} -ENTRYPOINT ["tini", "--", "sh", "-c"] -CMD ["/codium-server/bin/codium-server --server-base-path $RENKU_BASE_URL_PATH/ --without-connection-token --host 0.0.0.0 --port 8888"] +# We are setting this to a weird double underscore name to avoid collisions with user-set vars +ENV __WORKDIR__=${WORKDIR} +ENTRYPOINT ["tini", "--", "/bin/bash", "/entrypoint.sh"] diff --git a/docker/vscode/entrypoint.sh b/docker/vscode/entrypoint.sh new file mode 100644 index 00000000..ff32bd5e --- /dev/null +++ b/docker/vscode/entrypoint.sh @@ -0,0 +1,12 @@ +set -ex +WORKDIR=${__WORKDIR__} +mkdir -p "${WORKDIR}/.vscode/extensions" +/codium-server/bin/codium-server \ + --server-base-path "$RENKU_BASE_URL_PATH/" \ + --without-connection-token \ + --host 0.0.0.0 \ + --port 8888 \ + --extensions-dir "${WORKDIR}/.vscode/extensions" \ + --accept-server-license-terms \ + --telemetry-level off \ + --server-data-dir "${WORKDIR}/.vscode" From d3b18b248d4426ddd472aca046e2f4479e7d65b7 Mon Sep 17 00:00:00 2001 From: Tasko Olevski Date: Sun, 24 Nov 2024 09:47:47 +0100 Subject: [PATCH 10/20] Revert "revertme: disable all other CI pipelines" This reverts commit 11c65f0a719c30a6af1cccf002ed6650180bd621. --- .../workflows/build-and-push-to-docker.yml | 1296 ++++++++--------- 1 file changed, 648 insertions(+), 648 deletions(-) diff --git a/.github/workflows/build-and-push-to-docker.yml b/.github/workflows/build-and-push-to-docker.yml index b531021d..04dc4fab 100644 --- a/.github/workflows/build-and-push-to-docker.yml +++ b/.github/workflows/build-and-push-to-docker.yml @@ -54,654 +54,654 @@ jobs: dockerfile: ${{ matrix.DOCKERFILE_PATH }} config: .hadolint.yaml - # build-py: - # needs: lint - # runs-on: ubuntu-latest - # - # strategy: - # fail-fast: true - # matrix: - # 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: docker/login-action@v3 - # with: - # username: ${{ secrets.RENKU_DOCKER_USERNAME }} - # password: ${{ secrets.RENKU_DOCKER_PASSWORD }} - # - uses: actions/checkout@v4 - # - name: Set up QEMU - # uses: docker/setup-qemu-action@v3.2.0 - # - name: Set up Docker Buildx - # uses: docker/setup-buildx-action@v3 - # - name: Docker meta - # id: meta - # uses: docker/metadata-action@v5 - # with: - # images: ${{ env.DOCKER_PREFIX }}-py - # tags: | - # type=sha,prefix=${{ matrix.BASE_PYTHON_VERSION }}- - # - name: Build and load - # uses: docker/build-push-action@v6 - # with: - # build-args: | - # 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 - # labels: ${{ steps.meta.outputs.labels }} - # load: true - # tags: ${{ steps.meta.outputs.tags }} - # provenance: false - # - name: Image Acceptance Tests - # uses: cypress-io/github-action@v6 - # env: - # TEST_IMAGE_NAME: ${{ env.DOCKER_PREFIX }}-py:${{ steps.meta.outputs.version }} - # TEST_USER_NAME: jovyan - # TEST_SPEC: jupyterlab.cy.ts - # with: - # working-directory: tests - # command: npx mocha -r ts-node/register index.ts - # # export the base images for other jobs to use - # - name: Build and export - # uses: docker/build-push-action@v6 - # with: - # build-args: | - # BASE_IMAGE=${{ matrix.REGISTRY }}/jupyter/base-notebook:python-${{ matrix.BASE_PYTHON_VERSION }} - # cache-from: type=gha - # context: docker/py - # labels: ${{ steps.meta.outputs.labels }} - # push: true - # tags: ${{ steps.meta.outputs.tags }} - # provenance: false - # - # build-py-homedir-env: - # needs: lint - # runs-on: ubuntu-latest - # - # strategy: - # fail-fast: true - # matrix: - # BASE_PYTHON_VERSION: - # - "3.10" - # - "3.9" - # - "3.8" - # steps: - # - name: Docker Login - # uses: docker/login-action@v3 - # with: - # username: ${{ secrets.RENKU_DOCKER_USERNAME }} - # password: ${{ secrets.RENKU_DOCKER_PASSWORD }} - # - uses: actions/checkout@v4 - # - name: Set up QEMU - # uses: docker/setup-qemu-action@v3.2.0 - # - name: Set up Docker Buildx - # uses: docker/setup-buildx-action@v3 - # - name: Docker meta - # id: meta - # uses: docker/metadata-action@v5 - # with: - # images: ${{ env.DOCKER_PREFIX }}-py-homedir-envs - # tags: | - # type=sha,prefix=${{ matrix.BASE_PYTHON_VERSION }}- - # type=semver,pattern={{version}},prefix=${{ matrix.BASE_PYTHON_VERSION }}- - # type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' && matrix.BASE_PYTHON_VERSION == env.DEFAULT_PYTHON_VERSION }} - # - name: Build and load - # uses: docker/build-push-action@v6 - # with: - # build-args: | - # BASE_IMAGE=jupyter/base-notebook:python-${{ matrix.BASE_PYTHON_VERSION }} - # CONDA_ENVS_DIRS=/home/jovyan/work/envs - # cache-from: type=gha - # cache-to: type=gha,mode=max - # context: docker/py - # labels: ${{ steps.meta.outputs.labels }} - # load: true - # tags: ${{ steps.meta.outputs.tags }} - # provenance: false - # - name: Image Acceptance Tests - # uses: cypress-io/github-action@v6 - # env: - # TEST_IMAGE_NAME: ${{ env.DOCKER_PREFIX }}-py-homedir-envs:${{ steps.meta.outputs.version }} - # TEST_USER_NAME: jovyan - # TEST_SPEC: jupyterlab.cy.ts - # with: - # working-directory: tests - # command: npx mocha -r ts-node/register index.ts - # # export the default base image for other jobs to use - # - name: Build and export - # if: matrix.BASE_PYTHON_VERSION == env.DEFAULT_PYTHON_VERSION - # uses: docker/build-push-action@v6 - # with: - # build-args: | - # BASE_IMAGE=jupyter/base-notebook:python-${{ matrix.BASE_PYTHON_VERSION }} - # CONDA_ENVS_DIRS=/home/jovyan/work/envs - # cache-from: type=gha - # context: docker/py - # labels: ${{ steps.meta.outputs.labels }} - # push: true - # tags: ${{ steps.meta.outputs.tags }} - # provenance: false - # - # build-py-multiarch: - # needs: build-py - # runs-on: ubuntu-latest - # - # strategy: - # fail-fast: true - # matrix: - # 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: docker/login-action@v3 - # with: - # username: ${{ secrets.RENKU_DOCKER_USERNAME }} - # password: ${{ secrets.RENKU_DOCKER_PASSWORD }} - # - uses: actions/checkout@v4 - # - name: Set up QEMU - # uses: docker/setup-qemu-action@v3.2.0 - # - name: Set up Docker Buildx - # uses: docker/setup-buildx-action@v3 - # - name: Docker meta - # id: meta - # uses: docker/metadata-action@v5 - # with: - # images: ${{ env.DOCKER_PREFIX }}-py - # tags: | - # type=sha,prefix=${{ matrix.BASE_PYTHON_VERSION }}- - # type=semver,pattern={{version}},prefix=${{ matrix.BASE_PYTHON_VERSION }}- - # type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' && matrix.BASE_PYTHON_VERSION == env.DEFAULT_PYTHON_VERSION }} - # - name: Build and push - # uses: docker/build-push-action@v6 - # with: - # context: docker/py - # push: true - # tags: ${{ steps.meta.outputs.tags }} - # labels: ${{ steps.meta.outputs.labels }} - # cache-to: type=gha,mode=max - # cache-from: type=gha - # build-args: | - # BASE_IMAGE=${{ matrix.REGISTRY }}/jupyter/base-notebook:python-${{ matrix.BASE_PYTHON_VERSION }} - # platforms: linux/amd64,linux/arm64 - # provenance: false - # - # build-cuda: - # needs: build-py - # runs-on: ubuntu-latest - # - # strategy: - # fail-fast: true - # matrix: - # include: - # # taken from tensorflow compatibility chart at https://www.tensorflow.org/install/source#gpu - # - CUDA_VERSION: "11.2" - # EXTRA_LIBRARIES: "" - # CUDA_CUDART_PACKAGE: "cuda-cudart-11-2=11.2.152-1" - # CUDA_COMPAT_PACKAGE: "cuda-compat-11-2" - # LIBCUDNN_PACKAGE: "libcudnn8=8.1.1.33-1+cuda11.2" - # - CUDA_VERSION: "11.3" - # EXTRA_LIBRARIES: "" - # CUDA_CUDART_PACKAGE: "cuda-cudart-11-3=11.3.109-1" - # CUDA_COMPAT_PACKAGE: "cuda-compat-11-3" - # LIBCUDNN_PACKAGE: "libcudnn8=8.2.1.32-1+cuda11.3" - # - CUDA_VERSION: "11.4" - # EXTRA_LIBRARIES: "" - # CUDA_CUDART_PACKAGE: "cuda-cudart-11-4=11.4.148-1" - # CUDA_COMPAT_PACKAGE: "cuda-compat-11-4" - # LIBCUDNN_PACKAGE: "libcudnn8=8.2.4.15-1+cuda11.4" - # - CUDA_VERSION: "11.5" - # EXTRA_LIBRARIES: "" - # CUDA_CUDART_PACKAGE: "cuda-cudart-11-5=11.5.117-1" - # CUDA_COMPAT_PACKAGE: "cuda-compat-11-5" - # LIBCUDNN_PACKAGE: "libcudnn8=8.3.2.44-1+cuda11.5" - # - CUDA_VERSION: "11.7" - # EXTRA_LIBRARIES: "" - # CUDA_CUDART_PACKAGE: "cuda-cudart-11-7=11.7.60-1" - # CUDA_COMPAT_PACKAGE: "cuda-compat-11-7" - # LIBCUDNN_PACKAGE: "libcudnn8=8.5.0.96-1+cuda11.7" - # - CUDA_VERSION: "11.8" - # EXTRA_LIBRARIES: "" - # CUDA_CUDART_PACKAGE: "cuda-cudart-11-8=11.8.89-1" - # CUDA_COMPAT_PACKAGE: "cuda-compat-11-8" - # LIBCUDNN_PACKAGE: "libcudnn8=8.6.0.163-1+cuda11.8" - # ADD_2204_APT_REPOS: "true" - # - CUDA_VERSION: "12.2" - # EXTRA_LIBRARIES: "" - # CUDA_CUDART_PACKAGE: "cuda-cudart-12-2=12.2.140-1" - # CUDA_COMPAT_PACKAGE: "cuda-compat-12-2" - # LIBCUDNN_PACKAGE: "libcudnn8=8.9.5.29-1+cuda12.2" - # ADD_2204_APT_REPOS: "true" - # steps: - # - name: Docker Login - # uses: docker/login-action@v3 - # 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 Docker Buildx - # uses: docker/setup-buildx-action@v3 - # - name: Docker meta - # id: meta - # uses: docker/metadata-action@v5 - # with: - # images: ${{ env.DOCKER_PREFIX }}-cuda - # tags: | - # type=sha,prefix=${{ matrix.CUDA_VERSION }}- - # type=semver,pattern={{version}},prefix=${{ matrix.CUDA_VERSION }}- - # type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' && matrix.CUDA_VERSION == '11.7' }} - # - name: Build and load - # uses: docker/build-push-action@v6 - # with: - # build-args: | - # RENKU_BASE=${{ steps.vars.outputs.renku_base }} - # CUDA_COMPAT_PACKAGE=${{ matrix.CUDA_COMPAT_PACKAGE }} - # CUDA_CUDART_PACKAGE=${{ matrix.CUDA_CUDART_PACKAGE }} - # CUDA_VERSION=${{ matrix.CUDA_VERSION }} - # EXTRA_LIBRARIES=${{ matrix.EXTRA_LIBRARIES }} - # LIBCUDNN_PACKAGE=${{ matrix.LIBCUDNN_PACKAGE }} - # ADD_2204_APT_REPOS=${{ matrix.ADD_2204_APT_REPOS }} - # context: docker/cuda - # labels: ${{ steps.meta.outputs.labels }} - # load: true - # tags: ${{ steps.meta.outputs.tags }} - # cache-from: | - # type=inline - # type=registry,ref=${{ steps.vars.outputs.renku_base }} - # provenance: false - # - name: Image Acceptance Tests - # uses: cypress-io/github-action@v6 - # env: - # TEST_IMAGE_NAME: ${{ env.DOCKER_PREFIX }}-cuda:${{ steps.meta.outputs.version }} - # TEST_USER_NAME: jovyan - # TEST_SPEC: jupyterlab.cy.ts - # with: - # working-directory: tests - # command: npx mocha -r ts-node/register index.ts - # - name: Build and push - # uses: docker/build-push-action@v6 - # with: - # build-args: | - # RENKU_BASE=${{ steps.vars.outputs.renku_base }} - # CUDA_COMPAT_PACKAGE=${{ matrix.CUDA_COMPAT_PACKAGE }} - # CUDA_CUDART_PACKAGE=${{ matrix.CUDA_CUDART_PACKAGE }} - # CUDA_VERSION=${{ matrix.CUDA_VERSION }} - # EXTRA_LIBRARIES=${{ matrix.EXTRA_LIBRARIES }} - # LIBCUDNN_PACKAGE=${{ matrix.LIBCUDNN_PACKAGE }} - # context: docker/cuda - # labels: ${{ steps.meta.outputs.labels }} - # push: true - # tags: ${{ steps.meta.outputs.tags }} - # provenance: false - # - # build-py-ext: - # needs: build-py - # runs-on: ubuntu-latest - # strategy: - # fail-fast: true - # matrix: - # include: - # - EXTENSION: vnc - # PYTHON_VERSION: "3.10" - # - EXTENSION: vnc - # PYTHON_VERSION: "3.11" - # - EXTENSION: batch - # PYTHON_VERSION: "3.10" - # steps: - # - name: Docker Login - # uses: docker/login-action@v3 - # 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 - # - name: Set up QEMU - # uses: docker/setup-qemu-action@v3.2.0 - # - name: Set up Docker Buildx - # uses: docker/setup-buildx-action@v3 - # - name: Docker meta - # id: meta - # uses: docker/metadata-action@v5 - # with: - # images: ${{ env.DOCKER_PREFIX }}-${{ matrix.EXTENSION }} - # tags: | - # 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@v6 - # with: - # build-args: | - # 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 - # tags: ${{ steps.meta.outputs.tags }} - # cache-from: type=gha - # provenance: false - # platforms: linux/amd64,linux/arm64 - # - # build-matlab-ext: - # needs: build-py - # runs-on: ubuntu-latest - # strategy: - # fail-fast: true - # matrix: - # include: - # - EXTENSION: matlab-jupyter - # PYTHON_VERSION: "3.10" - # - EXTENSION: matlab-jupyter - # PYTHON_VERSION: "3.11" - # 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 - # - name: Set up QEMU - # uses: docker/setup-qemu-action@v3.2.0 - # - name: Set up Docker Buildx - # uses: docker/setup-buildx-action@v3 - # - name: Docker meta - # id: meta - # uses: docker/metadata-action@v5 - # with: - # images: ${{ env.DOCKER_PREFIX }}-${{ matrix.EXTENSION }} - # tags: | - # 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@v6 - # with: - # build-args: | - # 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 - # tags: ${{ steps.meta.outputs.tags }} - # cache-from: type=gha - # provenance: false - # platforms: linux/amd64 - # - # build-vnc-ext: - # needs: build-py-ext - # runs-on: ubuntu-latest - # strategy: - # fail-fast: true - # matrix: - # VNC-EXTENSION: - # - matlab - # - qgis - # steps: - # - name: Docker Login - # uses: docker/login-action@v3 - # with: - # username: ${{ secrets.RENKU_DOCKER_USERNAME }} - # password: ${{ secrets.RENKU_DOCKER_PASSWORD }} - # - name: Set up Docker Buildx - # uses: docker/setup-buildx-action@v3 - # - 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: Docker meta - # id: meta - # uses: docker/metadata-action@v5 - # with: - # images: ${{ env.DOCKER_PREFIX }}-${{ matrix.VNC-EXTENSION }} - # tags: | - # type=sha,prefix= - # type=semver,pattern={{version}},prefix= - # type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' }},prefix= - # - name: Build and push - # uses: docker/build-push-action@v6 - # with: - # build-args: | - # 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 - # tags: ${{ steps.meta.outputs.tags }} - # cache-from: type=gha - # provenance: false - # - # build-julia-ext: - # needs: build-py - # runs-on: ubuntu-latest - # - # strategy: - # fail-fast: true - # matrix: - # include: - # - JULIA_VERSION: "1.7.1" - # JULIA_CHECKSUM: "44658e9c7b45e2b9b5b59239d190cca42de05c175ea86bc346c294a8fe8d9f11" - # - JULIA_VERSION: "1.8.5" - # JULIA_CHECKSUM: "e71a24816e8fe9d5f4807664cbbb42738f5aa9fe05397d35c81d4c5d649b9d05" - # - JULIA_VERSION: "1.9.0" - # JULIA_CHECKSUM: "00c614466ef9809c2eb23480e38d196a2c577fff2730c4f83d135b913d473359" - # - # steps: - # - name: Docker Login - # uses: docker/login-action@v3 - # with: - # username: ${{ secrets.RENKU_DOCKER_USERNAME }} - # password: ${{ secrets.RENKU_DOCKER_PASSWORD }} - # - # - uses: actions/checkout@v4 - # - name: Set up QEMU - # uses: docker/setup-qemu-action@v3.2.0 - # - name: Set up Docker Buildx - # uses: docker/setup-buildx-action@v3 - # - 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: Docker meta - # id: meta - # uses: docker/metadata-action@v5 - # with: - # images: ${{ env.DOCKER_PREFIX }}-julia - # tags: | - # type=sha,prefix=${{ matrix.JULIA_VERSION }}- - # type=semver,pattern={{version}},prefix=${{ matrix.JULIA_VERSION }}- - # type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' && matrix.JULIA_VERSION == '1.9.0' }} - # - name: Build and load - # uses: docker/build-push-action@v6 - # with: - # build-args: | - # RENKU_BASE=${{ steps.vars.outputs.renku_base }} - # JULIA_VERSION_ARG=${{ matrix.JULIA_VERSION }} - # JULIA_CHECKSUM=${{ matrix.JULIA_CHECKSUM }} - # context: docker/julia - # labels: ${{ steps.meta.outputs.labels }} - # load: true - # tags: ${{ steps.meta.outputs.tags }} - # cache-from: type=gha - # cache-to: type=gha - # provenance: false - # - name: Image Acceptance Tests - # uses: cypress-io/github-action@v6 - # env: - # TEST_IMAGE_NAME: ${DOCKER_PREFIX}-julia:${{ matrix.JULIA_VERSION }}-${{ steps.vars.outputs.sha_short }} - # TEST_USER_NAME: jovyan - # TEST_SPEC: jupyterlab.cy.ts - # with: - # working-directory: tests - # command: npx mocha -r ts-node/register index.ts - # - name: Build and push - # uses: docker/build-push-action@v6 - # with: - # build-args: | - # RENKU_BASE=${{ steps.vars.outputs.renku_base }} - # context: docker/julia - # labels: ${{ steps.meta.outputs.labels }} - # push: true - # tags: ${{ steps.meta.outputs.tags }} - # cache-from: type=gha - # provenance: false - # - # build-r-ubuntu: - # needs: build-py - # runs-on: ubuntu-latest - # strategy: - # fail-fast: false - # matrix: - # include: - # - RVERSION: 4.1.0 - # BASE_IMAGE_NAME: rocker/verse - # EXTENSION: r - # RSTUDIO_VERSION: 2023.03.2+454 - # - RVERSION: 4.1.1 - # BASE_IMAGE_NAME: rocker/verse - # EXTENSION: r - # RSTUDIO_VERSION: 2023.03.2+454 - # - RVERSION: 4.1.2 - # BASE_IMAGE_NAME: rocker/verse - # EXTENSION: r - # RSTUDIO_VERSION: 2023.03.2+454 - # - RVERSION: 4.2.0 - # BASE_IMAGE_NAME: rocker/verse - # EXTENSION: r - # RSTUDIO_VERSION: 2023.03.2+454 - # - RVERSION: 4.2.3 - # BASE_IMAGE_NAME: rocker/verse - # EXTENSION: r - # RSTUDIO_VERSION: 2023.03.2+454 - # - RVERSION: 4.3.1 - # BASE_IMAGE_NAME: rocker/verse - # EXTENSION: r - # RSTUDIO_VERSION: 2023.12.1+402 - # - RVERSION: devel - # BASE_IMAGE_NAME: rocker/verse - # EXTENSION: r - # RSTUDIO_VERSION: 2023.12.1+402 - # - RVERSION: RELEASE_3_14 - # BASE_IMAGE_NAME: bioconductor/bioconductor_docker - # EXTENSION: bioc - # RSTUDIO_VERSION: 2023.03.2+454 - # - RVERSION: RELEASE_3_15 - # BASE_IMAGE_NAME: bioconductor/bioconductor_docker - # EXTENSION: bioc - # RSTUDIO_VERSION: 2023.03.2+454 - # - RVERSION: RELEASE_3_16 - # BASE_IMAGE_NAME: bioconductor/bioconductor_docker - # EXTENSION: bioc - # RSTUDIO_VERSION: 2023.12.1+402 - # - RVERSION: RELEASE_3_17 - # BASE_IMAGE_NAME: bioconductor/bioconductor_docker - # EXTENSION: bioc - # RSTUDIO_VERSION: 2023.12.1+402 - # - RVERSION: RELEASE_3_18 - # BASE_IMAGE_NAME: bioconductor/bioconductor_docker - # EXTENSION: bioc - # RSTUDIO_VERSION: 2023.12.1+402 - # # NOTE: The devel version of bioconductor uses unstable R so it often breaks or fails to build - # # - RVERSION: devel - # # BASE_IMAGE_NAME: bioconductor/bioconductor_docker - # # EXTENSION: bioc - # steps: - # - name: Docker Login - # uses: docker/login-action@v3 - # with: - # username: ${{ secrets.RENKU_DOCKER_USERNAME }} - # password: ${{ secrets.RENKU_DOCKER_PASSWORD }} - # - # - uses: actions/checkout@v4 - # - name: Set up Docker Buildx - # uses: docker/setup-buildx-action@v3 - # - 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: Docker meta - # id: meta - # uses: docker/metadata-action@v5 - # with: - # images: ${{ env.DOCKER_PREFIX }}-${{ matrix.EXTENSION }} - # tags: | - # type=sha,prefix=${{ matrix.RVERSION }}- - # type=semver,pattern={{version}},prefix=${{ matrix.RVERSION }}- - # type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' && matrix.RVERSION == 'devel' }} - # - name: Clean cache - # run: | - # df -h - # rm -rf /opt/hostedtoolcache/* - # df -h - # - name: Build and load - # uses: docker/build-push-action@v6 - # with: - # build-args: | - # RENKU_BASE=${{ steps.vars.outputs.renku_base }} - # BASE_IMAGE=${{ matrix.BASE_IMAGE_NAME }}:${{ matrix.RVERSION }} - # RSTUDIO_VERSION_OVERRIDE=${{ matrix.RSTUDIO_VERSION }} - # context: docker/r - # labels: ${{ steps.meta.outputs.labels }} - # load: true - # tags: ${{ steps.meta.outputs.tags }} - # cache-from: type=gha - # provenance: false - # - name: Image Acceptance Tests - # uses: cypress-io/github-action@v6 - # env: - # TEST_IMAGE_NAME: ${{ env.DOCKER_PREFIX }}-${{ matrix.EXTENSION }}:${{ matrix.RVERSION }}-${{ steps.vars.outputs.sha_short }} - # TEST_ENV: rstudio - # TEST_USER_NAME: rstudio - # TEST_SPEC: rstudio.cy.ts - # with: - # working-directory: tests - # start: docker images - # command: npx mocha -r ts-node/register index.ts - # - name: Build and push - # uses: docker/build-push-action@v6 - # with: - # build-args: | - # RENKU_BASE=${{ steps.vars.outputs.renku_base }} - # BASE_IMAGE=${{ matrix.BASE_IMAGE_NAME }}:${{ matrix.RVERSION }} - # RSTUDIO_VERSION_OVERRIDE=${{ matrix.RSTUDIO_VERSION }} - # context: docker/r - # labels: ${{ steps.meta.outputs.labels }} - # push: true - # tags: ${{ steps.meta.outputs.tags }} - # cache-from: type=gha - # provenance: false + build-py: + needs: lint + runs-on: ubuntu-latest + + strategy: + fail-fast: true + matrix: + 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: docker/login-action@v3 + with: + username: ${{ secrets.RENKU_DOCKER_USERNAME }} + password: ${{ secrets.RENKU_DOCKER_PASSWORD }} + - uses: actions/checkout@v4 + - name: Set up QEMU + uses: docker/setup-qemu-action@v3.2.0 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - name: Docker meta + id: meta + uses: docker/metadata-action@v5 + with: + images: ${{ env.DOCKER_PREFIX }}-py + tags: | + type=sha,prefix=${{ matrix.BASE_PYTHON_VERSION }}- + - name: Build and load + uses: docker/build-push-action@v6 + with: + build-args: | + 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 + labels: ${{ steps.meta.outputs.labels }} + load: true + tags: ${{ steps.meta.outputs.tags }} + provenance: false + - name: Image Acceptance Tests + uses: cypress-io/github-action@v6 + env: + TEST_IMAGE_NAME: ${{ env.DOCKER_PREFIX }}-py:${{ steps.meta.outputs.version }} + TEST_USER_NAME: jovyan + TEST_SPEC: jupyterlab.cy.ts + with: + working-directory: tests + command: npx mocha -r ts-node/register index.ts + # export the base images for other jobs to use + - name: Build and export + uses: docker/build-push-action@v6 + with: + build-args: | + BASE_IMAGE=${{ matrix.REGISTRY }}/jupyter/base-notebook:python-${{ matrix.BASE_PYTHON_VERSION }} + cache-from: type=gha + context: docker/py + labels: ${{ steps.meta.outputs.labels }} + push: true + tags: ${{ steps.meta.outputs.tags }} + provenance: false + + build-py-homedir-env: + needs: lint + runs-on: ubuntu-latest + + strategy: + fail-fast: true + matrix: + BASE_PYTHON_VERSION: + - "3.10" + - "3.9" + - "3.8" + steps: + - name: Docker Login + uses: docker/login-action@v3 + with: + username: ${{ secrets.RENKU_DOCKER_USERNAME }} + password: ${{ secrets.RENKU_DOCKER_PASSWORD }} + - uses: actions/checkout@v4 + - name: Set up QEMU + uses: docker/setup-qemu-action@v3.2.0 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - name: Docker meta + id: meta + uses: docker/metadata-action@v5 + with: + images: ${{ env.DOCKER_PREFIX }}-py-homedir-envs + tags: | + type=sha,prefix=${{ matrix.BASE_PYTHON_VERSION }}- + type=semver,pattern={{version}},prefix=${{ matrix.BASE_PYTHON_VERSION }}- + type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' && matrix.BASE_PYTHON_VERSION == env.DEFAULT_PYTHON_VERSION }} + - name: Build and load + uses: docker/build-push-action@v6 + with: + build-args: | + BASE_IMAGE=jupyter/base-notebook:python-${{ matrix.BASE_PYTHON_VERSION }} + CONDA_ENVS_DIRS=/home/jovyan/work/envs + cache-from: type=gha + cache-to: type=gha,mode=max + context: docker/py + labels: ${{ steps.meta.outputs.labels }} + load: true + tags: ${{ steps.meta.outputs.tags }} + provenance: false + - name: Image Acceptance Tests + uses: cypress-io/github-action@v6 + env: + TEST_IMAGE_NAME: ${{ env.DOCKER_PREFIX }}-py-homedir-envs:${{ steps.meta.outputs.version }} + TEST_USER_NAME: jovyan + TEST_SPEC: jupyterlab.cy.ts + with: + working-directory: tests + command: npx mocha -r ts-node/register index.ts + # export the default base image for other jobs to use + - name: Build and export + if: matrix.BASE_PYTHON_VERSION == env.DEFAULT_PYTHON_VERSION + uses: docker/build-push-action@v6 + with: + build-args: | + BASE_IMAGE=jupyter/base-notebook:python-${{ matrix.BASE_PYTHON_VERSION }} + CONDA_ENVS_DIRS=/home/jovyan/work/envs + cache-from: type=gha + context: docker/py + labels: ${{ steps.meta.outputs.labels }} + push: true + tags: ${{ steps.meta.outputs.tags }} + provenance: false + + build-py-multiarch: + needs: build-py + runs-on: ubuntu-latest + + strategy: + fail-fast: true + matrix: + 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: docker/login-action@v3 + with: + username: ${{ secrets.RENKU_DOCKER_USERNAME }} + password: ${{ secrets.RENKU_DOCKER_PASSWORD }} + - uses: actions/checkout@v4 + - name: Set up QEMU + uses: docker/setup-qemu-action@v3.2.0 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - name: Docker meta + id: meta + uses: docker/metadata-action@v5 + with: + images: ${{ env.DOCKER_PREFIX }}-py + tags: | + type=sha,prefix=${{ matrix.BASE_PYTHON_VERSION }}- + type=semver,pattern={{version}},prefix=${{ matrix.BASE_PYTHON_VERSION }}- + type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' && matrix.BASE_PYTHON_VERSION == env.DEFAULT_PYTHON_VERSION }} + - name: Build and push + uses: docker/build-push-action@v6 + with: + context: docker/py + push: true + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} + cache-to: type=gha,mode=max + cache-from: type=gha + build-args: | + BASE_IMAGE=${{ matrix.REGISTRY }}/jupyter/base-notebook:python-${{ matrix.BASE_PYTHON_VERSION }} + platforms: linux/amd64,linux/arm64 + provenance: false + + build-cuda: + needs: build-py + runs-on: ubuntu-latest + + strategy: + fail-fast: true + matrix: + include: + # taken from tensorflow compatibility chart at https://www.tensorflow.org/install/source#gpu + - CUDA_VERSION: "11.2" + EXTRA_LIBRARIES: "" + CUDA_CUDART_PACKAGE: "cuda-cudart-11-2=11.2.152-1" + CUDA_COMPAT_PACKAGE: "cuda-compat-11-2" + LIBCUDNN_PACKAGE: "libcudnn8=8.1.1.33-1+cuda11.2" + - CUDA_VERSION: "11.3" + EXTRA_LIBRARIES: "" + CUDA_CUDART_PACKAGE: "cuda-cudart-11-3=11.3.109-1" + CUDA_COMPAT_PACKAGE: "cuda-compat-11-3" + LIBCUDNN_PACKAGE: "libcudnn8=8.2.1.32-1+cuda11.3" + - CUDA_VERSION: "11.4" + EXTRA_LIBRARIES: "" + CUDA_CUDART_PACKAGE: "cuda-cudart-11-4=11.4.148-1" + CUDA_COMPAT_PACKAGE: "cuda-compat-11-4" + LIBCUDNN_PACKAGE: "libcudnn8=8.2.4.15-1+cuda11.4" + - CUDA_VERSION: "11.5" + EXTRA_LIBRARIES: "" + CUDA_CUDART_PACKAGE: "cuda-cudart-11-5=11.5.117-1" + CUDA_COMPAT_PACKAGE: "cuda-compat-11-5" + LIBCUDNN_PACKAGE: "libcudnn8=8.3.2.44-1+cuda11.5" + - CUDA_VERSION: "11.7" + EXTRA_LIBRARIES: "" + CUDA_CUDART_PACKAGE: "cuda-cudart-11-7=11.7.60-1" + CUDA_COMPAT_PACKAGE: "cuda-compat-11-7" + LIBCUDNN_PACKAGE: "libcudnn8=8.5.0.96-1+cuda11.7" + - CUDA_VERSION: "11.8" + EXTRA_LIBRARIES: "" + CUDA_CUDART_PACKAGE: "cuda-cudart-11-8=11.8.89-1" + CUDA_COMPAT_PACKAGE: "cuda-compat-11-8" + LIBCUDNN_PACKAGE: "libcudnn8=8.6.0.163-1+cuda11.8" + ADD_2204_APT_REPOS: "true" + - CUDA_VERSION: "12.2" + EXTRA_LIBRARIES: "" + CUDA_CUDART_PACKAGE: "cuda-cudart-12-2=12.2.140-1" + CUDA_COMPAT_PACKAGE: "cuda-compat-12-2" + LIBCUDNN_PACKAGE: "libcudnn8=8.9.5.29-1+cuda12.2" + ADD_2204_APT_REPOS: "true" + steps: + - name: Docker Login + uses: docker/login-action@v3 + 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 Docker Buildx + uses: docker/setup-buildx-action@v3 + - name: Docker meta + id: meta + uses: docker/metadata-action@v5 + with: + images: ${{ env.DOCKER_PREFIX }}-cuda + tags: | + type=sha,prefix=${{ matrix.CUDA_VERSION }}- + type=semver,pattern={{version}},prefix=${{ matrix.CUDA_VERSION }}- + type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' && matrix.CUDA_VERSION == '11.7' }} + - name: Build and load + uses: docker/build-push-action@v6 + with: + build-args: | + RENKU_BASE=${{ steps.vars.outputs.renku_base }} + CUDA_COMPAT_PACKAGE=${{ matrix.CUDA_COMPAT_PACKAGE }} + CUDA_CUDART_PACKAGE=${{ matrix.CUDA_CUDART_PACKAGE }} + CUDA_VERSION=${{ matrix.CUDA_VERSION }} + EXTRA_LIBRARIES=${{ matrix.EXTRA_LIBRARIES }} + LIBCUDNN_PACKAGE=${{ matrix.LIBCUDNN_PACKAGE }} + ADD_2204_APT_REPOS=${{ matrix.ADD_2204_APT_REPOS }} + context: docker/cuda + labels: ${{ steps.meta.outputs.labels }} + load: true + tags: ${{ steps.meta.outputs.tags }} + cache-from: | + type=inline + type=registry,ref=${{ steps.vars.outputs.renku_base }} + provenance: false + - name: Image Acceptance Tests + uses: cypress-io/github-action@v6 + env: + TEST_IMAGE_NAME: ${{ env.DOCKER_PREFIX }}-cuda:${{ steps.meta.outputs.version }} + TEST_USER_NAME: jovyan + TEST_SPEC: jupyterlab.cy.ts + with: + working-directory: tests + command: npx mocha -r ts-node/register index.ts + - name: Build and push + uses: docker/build-push-action@v6 + with: + build-args: | + RENKU_BASE=${{ steps.vars.outputs.renku_base }} + CUDA_COMPAT_PACKAGE=${{ matrix.CUDA_COMPAT_PACKAGE }} + CUDA_CUDART_PACKAGE=${{ matrix.CUDA_CUDART_PACKAGE }} + CUDA_VERSION=${{ matrix.CUDA_VERSION }} + EXTRA_LIBRARIES=${{ matrix.EXTRA_LIBRARIES }} + LIBCUDNN_PACKAGE=${{ matrix.LIBCUDNN_PACKAGE }} + context: docker/cuda + labels: ${{ steps.meta.outputs.labels }} + push: true + tags: ${{ steps.meta.outputs.tags }} + provenance: false + + build-py-ext: + needs: build-py + runs-on: ubuntu-latest + strategy: + fail-fast: true + matrix: + include: + - EXTENSION: vnc + PYTHON_VERSION: "3.10" + - EXTENSION: vnc + PYTHON_VERSION: "3.11" + - EXTENSION: batch + PYTHON_VERSION: "3.10" + steps: + - name: Docker Login + uses: docker/login-action@v3 + 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 + - name: Set up QEMU + uses: docker/setup-qemu-action@v3.2.0 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - name: Docker meta + id: meta + uses: docker/metadata-action@v5 + with: + images: ${{ env.DOCKER_PREFIX }}-${{ matrix.EXTENSION }} + tags: | + 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@v6 + with: + build-args: | + 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 + tags: ${{ steps.meta.outputs.tags }} + cache-from: type=gha + provenance: false + platforms: linux/amd64,linux/arm64 + + build-matlab-ext: + needs: build-py + runs-on: ubuntu-latest + strategy: + fail-fast: true + matrix: + include: + - EXTENSION: matlab-jupyter + PYTHON_VERSION: "3.10" + - EXTENSION: matlab-jupyter + PYTHON_VERSION: "3.11" + 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 + - name: Set up QEMU + uses: docker/setup-qemu-action@v3.2.0 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - name: Docker meta + id: meta + uses: docker/metadata-action@v5 + with: + images: ${{ env.DOCKER_PREFIX }}-${{ matrix.EXTENSION }} + tags: | + 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@v6 + with: + build-args: | + 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 + tags: ${{ steps.meta.outputs.tags }} + cache-from: type=gha + provenance: false + platforms: linux/amd64 + + build-vnc-ext: + needs: build-py-ext + runs-on: ubuntu-latest + strategy: + fail-fast: true + matrix: + VNC-EXTENSION: + - matlab + - qgis + steps: + - name: Docker Login + uses: docker/login-action@v3 + with: + username: ${{ secrets.RENKU_DOCKER_USERNAME }} + password: ${{ secrets.RENKU_DOCKER_PASSWORD }} + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - 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: Docker meta + id: meta + uses: docker/metadata-action@v5 + with: + images: ${{ env.DOCKER_PREFIX }}-${{ matrix.VNC-EXTENSION }} + tags: | + type=sha,prefix= + type=semver,pattern={{version}},prefix= + type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' }},prefix= + - name: Build and push + uses: docker/build-push-action@v6 + with: + build-args: | + 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 + tags: ${{ steps.meta.outputs.tags }} + cache-from: type=gha + provenance: false + + build-julia-ext: + needs: build-py + runs-on: ubuntu-latest + + strategy: + fail-fast: true + matrix: + include: + - JULIA_VERSION: "1.7.1" + JULIA_CHECKSUM: "44658e9c7b45e2b9b5b59239d190cca42de05c175ea86bc346c294a8fe8d9f11" + - JULIA_VERSION: "1.8.5" + JULIA_CHECKSUM: "e71a24816e8fe9d5f4807664cbbb42738f5aa9fe05397d35c81d4c5d649b9d05" + - JULIA_VERSION: "1.9.0" + JULIA_CHECKSUM: "00c614466ef9809c2eb23480e38d196a2c577fff2730c4f83d135b913d473359" + + steps: + - name: Docker Login + uses: docker/login-action@v3 + with: + username: ${{ secrets.RENKU_DOCKER_USERNAME }} + password: ${{ secrets.RENKU_DOCKER_PASSWORD }} + + - uses: actions/checkout@v4 + - name: Set up QEMU + uses: docker/setup-qemu-action@v3.2.0 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - 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: Docker meta + id: meta + uses: docker/metadata-action@v5 + with: + images: ${{ env.DOCKER_PREFIX }}-julia + tags: | + type=sha,prefix=${{ matrix.JULIA_VERSION }}- + type=semver,pattern={{version}},prefix=${{ matrix.JULIA_VERSION }}- + type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' && matrix.JULIA_VERSION == '1.9.0' }} + - name: Build and load + uses: docker/build-push-action@v6 + with: + build-args: | + RENKU_BASE=${{ steps.vars.outputs.renku_base }} + JULIA_VERSION_ARG=${{ matrix.JULIA_VERSION }} + JULIA_CHECKSUM=${{ matrix.JULIA_CHECKSUM }} + context: docker/julia + labels: ${{ steps.meta.outputs.labels }} + load: true + tags: ${{ steps.meta.outputs.tags }} + cache-from: type=gha + cache-to: type=gha + provenance: false + - name: Image Acceptance Tests + uses: cypress-io/github-action@v6 + env: + TEST_IMAGE_NAME: ${DOCKER_PREFIX}-julia:${{ matrix.JULIA_VERSION }}-${{ steps.vars.outputs.sha_short }} + TEST_USER_NAME: jovyan + TEST_SPEC: jupyterlab.cy.ts + with: + working-directory: tests + command: npx mocha -r ts-node/register index.ts + - name: Build and push + uses: docker/build-push-action@v6 + with: + build-args: | + RENKU_BASE=${{ steps.vars.outputs.renku_base }} + context: docker/julia + labels: ${{ steps.meta.outputs.labels }} + push: true + tags: ${{ steps.meta.outputs.tags }} + cache-from: type=gha + provenance: false + + build-r-ubuntu: + needs: build-py + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + include: + - RVERSION: 4.1.0 + BASE_IMAGE_NAME: rocker/verse + EXTENSION: r + RSTUDIO_VERSION: 2023.03.2+454 + - RVERSION: 4.1.1 + BASE_IMAGE_NAME: rocker/verse + EXTENSION: r + RSTUDIO_VERSION: 2023.03.2+454 + - RVERSION: 4.1.2 + BASE_IMAGE_NAME: rocker/verse + EXTENSION: r + RSTUDIO_VERSION: 2023.03.2+454 + - RVERSION: 4.2.0 + BASE_IMAGE_NAME: rocker/verse + EXTENSION: r + RSTUDIO_VERSION: 2023.03.2+454 + - RVERSION: 4.2.3 + BASE_IMAGE_NAME: rocker/verse + EXTENSION: r + RSTUDIO_VERSION: 2023.03.2+454 + - RVERSION: 4.3.1 + BASE_IMAGE_NAME: rocker/verse + EXTENSION: r + RSTUDIO_VERSION: 2023.12.1+402 + - RVERSION: devel + BASE_IMAGE_NAME: rocker/verse + EXTENSION: r + RSTUDIO_VERSION: 2023.12.1+402 + - RVERSION: RELEASE_3_14 + BASE_IMAGE_NAME: bioconductor/bioconductor_docker + EXTENSION: bioc + RSTUDIO_VERSION: 2023.03.2+454 + - RVERSION: RELEASE_3_15 + BASE_IMAGE_NAME: bioconductor/bioconductor_docker + EXTENSION: bioc + RSTUDIO_VERSION: 2023.03.2+454 + - RVERSION: RELEASE_3_16 + BASE_IMAGE_NAME: bioconductor/bioconductor_docker + EXTENSION: bioc + RSTUDIO_VERSION: 2023.12.1+402 + - RVERSION: RELEASE_3_17 + BASE_IMAGE_NAME: bioconductor/bioconductor_docker + EXTENSION: bioc + RSTUDIO_VERSION: 2023.12.1+402 + - RVERSION: RELEASE_3_18 + BASE_IMAGE_NAME: bioconductor/bioconductor_docker + EXTENSION: bioc + RSTUDIO_VERSION: 2023.12.1+402 + # NOTE: The devel version of bioconductor uses unstable R so it often breaks or fails to build + # - RVERSION: devel + # BASE_IMAGE_NAME: bioconductor/bioconductor_docker + # EXTENSION: bioc + steps: + - name: Docker Login + uses: docker/login-action@v3 + with: + username: ${{ secrets.RENKU_DOCKER_USERNAME }} + password: ${{ secrets.RENKU_DOCKER_PASSWORD }} + + - uses: actions/checkout@v4 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - 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: Docker meta + id: meta + uses: docker/metadata-action@v5 + with: + images: ${{ env.DOCKER_PREFIX }}-${{ matrix.EXTENSION }} + tags: | + type=sha,prefix=${{ matrix.RVERSION }}- + type=semver,pattern={{version}},prefix=${{ matrix.RVERSION }}- + type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' && matrix.RVERSION == 'devel' }} + - name: Clean cache + run: | + df -h + rm -rf /opt/hostedtoolcache/* + df -h + - name: Build and load + uses: docker/build-push-action@v6 + with: + build-args: | + RENKU_BASE=${{ steps.vars.outputs.renku_base }} + BASE_IMAGE=${{ matrix.BASE_IMAGE_NAME }}:${{ matrix.RVERSION }} + RSTUDIO_VERSION_OVERRIDE=${{ matrix.RSTUDIO_VERSION }} + context: docker/r + labels: ${{ steps.meta.outputs.labels }} + load: true + tags: ${{ steps.meta.outputs.tags }} + cache-from: type=gha + provenance: false + - name: Image Acceptance Tests + uses: cypress-io/github-action@v6 + env: + TEST_IMAGE_NAME: ${{ env.DOCKER_PREFIX }}-${{ matrix.EXTENSION }}:${{ matrix.RVERSION }}-${{ steps.vars.outputs.sha_short }} + TEST_ENV: rstudio + TEST_USER_NAME: rstudio + TEST_SPEC: rstudio.cy.ts + with: + working-directory: tests + start: docker images + command: npx mocha -r ts-node/register index.ts + - name: Build and push + uses: docker/build-push-action@v6 + with: + build-args: | + RENKU_BASE=${{ steps.vars.outputs.renku_base }} + BASE_IMAGE=${{ matrix.BASE_IMAGE_NAME }}:${{ matrix.RVERSION }} + RSTUDIO_VERSION_OVERRIDE=${{ matrix.RSTUDIO_VERSION }} + context: docker/r + labels: ${{ steps.meta.outputs.labels }} + push: true + tags: ${{ steps.meta.outputs.tags }} + cache-from: type=gha + provenance: false build-vscode-base: needs: lint From 178f2fe012fed5696cae9125167699ae0f9721c5 Mon Sep 17 00:00:00 2001 From: Tasko Olevski Date: Mon, 25 Nov 2024 09:20:11 +0100 Subject: [PATCH 11/20] squashme: address comments --- docker/vscode/base.Dockerfile | 5 +++-- docker/vscode/conda.Dockerfile | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/docker/vscode/base.Dockerfile b/docker/vscode/base.Dockerfile index dae29ff6..f1326c48 100644 --- a/docker/vscode/base.Dockerfile +++ b/docker/vscode/base.Dockerfile @@ -1,14 +1,15 @@ -ARG BASE_IMAGE=mcr.microsoft.com/devcontainers/base:bookworm +ARG BASE_IMAGE=debian:bookworm FROM $BASE_IMAGE ARG VSCODIUM_VERSION=1.95.2.24313 ARG SESSION_USER=vscode ARG WORKDIR=/home/${SESSION_USER}/work SHELL [ "/bin/bash", "-c", "-o", "pipefail" ] RUN apt-get update && \ - apt-get install -y --no-install-recommends curl tini git-lfs && \ + apt-get install -y --no-install-recommends ca-certificates curl tini build-essential git git-lfs && \ mkdir -p /codium-server && \ curl -L https://github.com/VSCodium/vscodium/releases/download/${VSCODIUM_VERSION}/vscodium-reh-web-linux-x64-${VSCODIUM_VERSION}.tar.gz | tar -xz -C /codium-server && \ rm -rf /var/lib/apt/lists/* +RUN useradd -m -s /bin/bash ${SESSION_USER} USER ${SESSION_USER} COPY entrypoint.sh /entrypoint.sh diff --git a/docker/vscode/conda.Dockerfile b/docker/vscode/conda.Dockerfile index 00dd6dee..5145bc77 100644 --- a/docker/vscode/conda.Dockerfile +++ b/docker/vscode/conda.Dockerfile @@ -11,10 +11,10 @@ SHELL [ "/bin/bash", "-c", "-o", "pipefail" ] USER root RUN apt-get update && \ apt-get install -y curl --no-install-recommends && \ - curl -L "https://github.com/conda-forge/miniforge/releases/download/${MINIFORGE_VERSION}/Miniforge3-${OS}-${ARCH}.sh" -o install.sh && \ + curl -L "https://github.com/conda-forge/miniforge/releases/download/${MINIFORGE_VERSION}/Miniforge3-${OS}-${ARCH}.sh" -o /install.sh && \ rm -rf /var/lib/apt/lists/* USER ${SESSION_USER} WORKDIR ${WORKDIR} ENTRYPOINT ["tini", "--", "sh", "-c"] -CMD ["bash /install.sh -b -u -p ${VENVS_PATH} && ${VENVS_PATH}/bin/conda init && /codium-server/bin/codium-server --server-base-path $RENKU_BASE_URL_PATH/ --without-connection-token --host 0.0.0.0 --port 8888"] +CMD ["bash /install.sh -b -u -p ${VENVS_PATH} && ${VENVS_PATH}/bin/conda init && bash /entrypoint.sh"] From a23a550da4bd243928191dc3b327bd022c7fbab4 Mon Sep 17 00:00:00 2001 From: Tasko Olevski Date: Mon, 25 Nov 2024 09:25:51 +0100 Subject: [PATCH 12/20] squashme: fix build steps --- .github/workflows/build-and-push-to-docker.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-and-push-to-docker.yml b/.github/workflows/build-and-push-to-docker.yml index 04dc4fab..deeeb92d 100644 --- a/.github/workflows/build-and-push-to-docker.yml +++ b/.github/workflows/build-and-push-to-docker.yml @@ -711,8 +711,8 @@ jobs: fail-fast: true matrix: include: - - DEBIAN_VERSION: debian - DEBIAN_VERSION: bookworm + LATEST: true steps: - name: Docker Login uses: docker/login-action@v3 @@ -732,12 +732,12 @@ jobs: tags: | type=sha,prefix=${{ matrix.DEBIAN_VERSION }}- type=semver,pattern={{version}},prefix=${{ matrix.DEBIAN_VERSION }}- - type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' && matrix.DEBIAN_VERSION == 'debian' }} + type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' && matrix.LATEST }} - name: Build and export uses: docker/build-push-action@v6 with: build-args: | - BASE_IMAGE=mcr.microsoft.com/devcontainers/base:${{ matrix.DEBIAN_VERSION }} + BASE_IMAGE=debian:${{ matrix.DEBIAN_VERSION }} cache-from: type=gha cache-to: type=gha,mode=max context: docker/vscode From c49cb935fcc0909d8b56a3780af53edb5f6522a7 Mon Sep 17 00:00:00 2001 From: Tasko Olevski Date: Mon, 25 Nov 2024 10:20:57 +0100 Subject: [PATCH 13/20] squashme: use debian as image tag --- .../workflows/build-and-push-to-docker.yml | 31 ++++++++++--------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/.github/workflows/build-and-push-to-docker.yml b/.github/workflows/build-and-push-to-docker.yml index deeeb92d..ecb9a4f0 100644 --- a/.github/workflows/build-and-push-to-docker.yml +++ b/.github/workflows/build-and-push-to-docker.yml @@ -711,7 +711,8 @@ jobs: fail-fast: true matrix: include: - - DEBIAN_VERSION: bookworm + - BASE_IMAGE: debian:bookworm + BASE_IMAGE_TAG: debian LATEST: true steps: - name: Docker Login @@ -730,14 +731,14 @@ jobs: with: images: ${{ env.DOCKER_PREFIX }}-vscode tags: | - type=sha,prefix=${{ matrix.DEBIAN_VERSION }}- - type=semver,pattern={{version}},prefix=${{ matrix.DEBIAN_VERSION }}- + type=sha,prefix=${{ matrix.BASE_IMAGE_TAG }}- + type=semver,pattern={{version}},prefix=${{ matrix.BASE_IMAGE_TAG }}- type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' && matrix.LATEST }} - name: Build and export uses: docker/build-push-action@v6 with: build-args: | - BASE_IMAGE=debian:${{ matrix.DEBIAN_VERSION }} + BASE_IMAGE=${{ matrix.BASE_IMAGE }} cache-from: type=gha cache-to: type=gha,mode=max context: docker/vscode @@ -756,9 +757,9 @@ jobs: matrix: include: - CONDA_VERSION: 24.9.2-0 - BASE_DEBIAN_VERSION: bookworm + BASE_IMAGE_TAG: debian - CONDA_VERSION: latest - BASE_DEBIAN_VERSION: bookworm + BASE_IMAGE_TAG: debian steps: - name: Docker Login uses: docker/login-action@v3 @@ -771,7 +772,7 @@ jobs: run: | sha_short=$(git rev-parse --short HEAD) echo "sha_short=$sha_short" >> $GITHUB_OUTPUT - echo "renku_base=${DOCKER_PREFIX}-vscode:${{ matrix.BASE_DEBIAN_VERSION }}-${sha_short}" >> $GITHUB_OUTPUT + echo "renku_base=${DOCKER_PREFIX}-vscode:${{ matrix.BASE_IMAGE_TAG }}-${sha_short}" >> $GITHUB_OUTPUT - name: Set up QEMU uses: docker/setup-qemu-action@v3.2.0 - name: Set up Docker Buildx @@ -808,17 +809,17 @@ jobs: matrix: include: - PYTHON_VERSION: 3.12.7 - BASE_DEBIAN_VERSION: bookworm + BASE_IMAGE_TAG: debian PYENV_VERSION: v2.4.17 POETRY_VERSION: 1.8.4 LATEST: true - PYTHON_VERSION: 3.11.10 - BASE_DEBIAN_VERSION: bookworm + BASE_IMAGE_TAG: debian PYENV_VERSION: v2.4.17 POETRY_VERSION: 1.8.4 LATEST: false - PYTHON_VERSION: 3.10.15 - BASE_DEBIAN_VERSION: bookworm + BASE_IMAGE_TAG: debian PYENV_VERSION: v2.4.17 POETRY_VERSION: 1.8.4 LATEST: false @@ -834,7 +835,7 @@ jobs: run: | sha_short=$(git rev-parse --short HEAD) echo "sha_short=$sha_short" >> $GITHUB_OUTPUT - echo "renku_base=${DOCKER_PREFIX}-vscode:${{ matrix.BASE_DEBIAN_VERSION }}-${sha_short}" >> $GITHUB_OUTPUT + echo "renku_base=${DOCKER_PREFIX}-vscode:${{ matrix.BASE_IMAGE_TAG }}-${sha_short}" >> $GITHUB_OUTPUT - name: Set up QEMU uses: docker/setup-qemu-action@v3.2.0 - name: Set up Docker Buildx @@ -874,13 +875,13 @@ jobs: matrix: include: - R_VERSION: 4.4.2 - BASE_DEBIAN_VERSION: bookworm + BASE_IMAGE_TAG: debian LATEST: true - R_VERSION: 4.3.3 - BASE_DEBIAN_VERSION: bookworm + BASE_IMAGE_TAG: debian LATEST: false - R_VERSION: 4.2.3 - BASE_DEBIAN_VERSION: bookworm + BASE_IMAGE_TAG: debian LATEST: false steps: - name: Docker Login @@ -894,7 +895,7 @@ jobs: run: | sha_short=$(git rev-parse --short HEAD) echo "sha_short=$sha_short" >> $GITHUB_OUTPUT - echo "renku_base=${DOCKER_PREFIX}-vscode:${{ matrix.BASE_DEBIAN_VERSION }}-${sha_short}" >> $GITHUB_OUTPUT + echo "renku_base=${DOCKER_PREFIX}-vscode:${{ matrix.BASE_IMAGE_TAG }}-${sha_short}" >> $GITHUB_OUTPUT - name: Set up QEMU uses: docker/setup-qemu-action@v3.2.0 - name: Set up Docker Buildx From 68364cbba1e9dc146cc286c0c04f759659d51090 Mon Sep 17 00:00:00 2001 From: Tasko Olevski Date: Mon, 25 Nov 2024 11:47:25 +0100 Subject: [PATCH 14/20] squashme: use micromamba to install conda --- .../workflows/build-and-push-to-docker.yml | 21 ++++++++++++------- docker/vscode/conda.Dockerfile | 19 +++++++++++------ 2 files changed, 26 insertions(+), 14 deletions(-) diff --git a/.github/workflows/build-and-push-to-docker.yml b/.github/workflows/build-and-push-to-docker.yml index ecb9a4f0..82e5c2ab 100644 --- a/.github/workflows/build-and-push-to-docker.yml +++ b/.github/workflows/build-and-push-to-docker.yml @@ -756,10 +756,15 @@ jobs: fail-fast: true matrix: include: - - CONDA_VERSION: 24.9.2-0 + - PYTHON_VERSION: 3.12.7 BASE_IMAGE_TAG: debian - - CONDA_VERSION: latest + LATEST: true + - PYTHON_VERSION: 3.11.10 + BASE_IMAGE_TAG: debian + LATEST: true + - PYTHON_VERSION: 3.10.15 BASE_IMAGE_TAG: debian + LATEST: true steps: - name: Docker Login uses: docker/login-action@v3 @@ -781,11 +786,11 @@ jobs: id: meta uses: docker/metadata-action@v5 with: - images: ${{ env.DOCKER_PREFIX }}-vscode-conda + images: ${{ env.DOCKER_PREFIX }}-vscode-python tags: | - type=sha,prefix=${{ matrix.CONDA_VERSION }}- - type=semver,pattern={{version}},prefix=${{ matrix.CONDA_VERSION }}- - type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' && matrix.CONDA_VERSION == 'latest' }} + type=sha,prefix=py-${{ matrix.PYTHON_VERSION }}- + type=semver,pattern={{version}},prefix=py-${{ matrix.PYTHON_VERSION }}- + type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' && matrix.LATEST }} - name: Build and export uses: docker/build-push-action@v6 with: @@ -906,8 +911,8 @@ jobs: with: images: ${{ env.DOCKER_PREFIX }}-vscode-r tags: | - type=sha,prefix=${{ matrix.R_VERSION }}- - type=semver,pattern={{version}},prefix=${{ matrix.R_VERSION }}- + type=sha,prefix=r-${{ matrix.R_VERSION }}- + type=semver,pattern={{version}},prefix=r-${{ matrix.R_VERSION }}- type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' && matrix.LATEST }} - name: Build and export uses: docker/build-push-action@v6 diff --git a/docker/vscode/conda.Dockerfile b/docker/vscode/conda.Dockerfile index 5145bc77..6516add8 100644 --- a/docker/vscode/conda.Dockerfile +++ b/docker/vscode/conda.Dockerfile @@ -1,20 +1,27 @@ ARG BASE_IMAGE=renku/renkulab-vscode:latest FROM $BASE_IMAGE -ARG MINIFORGE_VERSION=24.9.2-0 -ARG OS=Linux -ARG ARCH=x86_64 +ARG MICROMAMBA_VERSION=2.0.2-2 +ARG MAMBA_VERSION=1.5.9 +ARG CONDA_VERSION=24.9.2 +ARG PYTHON_VERSION=3.12.7 +ARG OS=linux +ARG ARCH=64 ARG SESSION_USER=vscode ARG WORKDIR=/home/${SESSION_USER}/work ARG VENVS_PATH=${WORKDIR}/.venvs -ENV VENVS_PATH=${VENVS_PATH} +ENV __VENVS_PATH__=${VENVS_PATH} +ENV __PYTHON_VERSION__=${PYTHON_VERSION} +ENV __MAMBA_VERSION__=${MAMBA_VERSION} +ENV __CONDA_VERSION__=${CONDA_VERSION} SHELL [ "/bin/bash", "-c", "-o", "pipefail" ] USER root RUN apt-get update && \ apt-get install -y curl --no-install-recommends && \ - curl -L "https://github.com/conda-forge/miniforge/releases/download/${MINIFORGE_VERSION}/Miniforge3-${OS}-${ARCH}.sh" -o /install.sh && \ + curl -L "https://github.com/mamba-org/micromamba-releases/releases/download/${MICROMAMBA_VERSION}/micromamba-${OS}-${ARCH}" -o /usr/local/bin/micromamba && \ + chmod a+x /usr/local/bin/micromamba && \ rm -rf /var/lib/apt/lists/* USER ${SESSION_USER} WORKDIR ${WORKDIR} ENTRYPOINT ["tini", "--", "sh", "-c"] -CMD ["bash /install.sh -b -u -p ${VENVS_PATH} && ${VENVS_PATH}/bin/conda init && bash /entrypoint.sh"] +CMD ["set -ex && micromamba install --yes --root-prefix=${__VENVS_PATH__} --prefix=${__VENVS_PATH__} python=${__PYTHON_VERSION__} mamba=${__MAMBA_VERSION__} conda=${__CONDA_VERSION__} && ${__VENVS_PATH__}/bin/mamba init && ${__VENVS_PATH__}/bin/conda config --add channels conda-forge && ${__VENVS_PATH__}/bin/conda config --set channel_priority strict && bash /entrypoint.sh"] From 741c5d93e4ac7cfc93f3ac4c8ebec73f0beadae9 Mon Sep 17 00:00:00 2001 From: Tasko Olevski Date: Mon, 25 Nov 2024 23:15:17 +0100 Subject: [PATCH 15/20] squashme: use same docker login everywhere --- .github/workflows/build-and-push-to-docker.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-and-push-to-docker.yml b/.github/workflows/build-and-push-to-docker.yml index 82e5c2ab..7dbe1ba4 100644 --- a/.github/workflows/build-and-push-to-docker.yml +++ b/.github/workflows/build-and-push-to-docker.yml @@ -418,7 +418,7 @@ jobs: PYTHON_VERSION: "3.11" steps: - name: Docker Login - uses: Azure/docker-login@v1 + uses: docker/login-action@v3 with: username: ${{ secrets.RENKU_DOCKER_USERNAME }} password: ${{ secrets.RENKU_DOCKER_PASSWORD }} From 4b0aff47a603da5bc9d534237c3adc589658d7b5 Mon Sep 17 00:00:00 2001 From: Tasko Olevski Date: Mon, 25 Nov 2024 23:56:22 +0100 Subject: [PATCH 16/20] squashme: set mountdir separate from workdir --- docker/vscode/R.Dockerfile | 11 +++++++---- docker/vscode/base.Dockerfile | 8 ++++++-- docker/vscode/conda.Dockerfile | 6 ++++-- docker/vscode/entrypoint.sh | 8 ++++---- docker/vscode/poetry.Dockerfile | 6 ++++-- 5 files changed, 25 insertions(+), 14 deletions(-) diff --git a/docker/vscode/R.Dockerfile b/docker/vscode/R.Dockerfile index 4c011471..3ec45f74 100644 --- a/docker/vscode/R.Dockerfile +++ b/docker/vscode/R.Dockerfile @@ -2,7 +2,8 @@ ARG BASE_IMAGE=renku/renkulab-vscode:latest FROM $BASE_IMAGE ARG R_VERSION=4.4.2 ARG SESSION_USER=vscode -ARG WORKDIR=/home/${SESSION_USER}/work +ARG WORKDIR=/home/${SESSION_USER} +ARG MOUNTDIR=${WORKDIR}/work SHELL [ "/bin/bash", "-c", "-o", "pipefail" ] USER root @@ -16,11 +17,13 @@ RUN curl -O https://cdn.rstudio.com/r/debian-12/pkgs/r-${R_VERSION}_1_amd64.deb && ln -s /opt/R/${R_VERSION}/bin/Rscript /usr/local/bin/Rscript USER ${SESSION_USER} +ENV __MOUNTDIR__=${MOUNTDIR} WORKDIR ${WORKDIR} # The .Renviron changes allow R to install packages in the work directory # See https://www.r-bloggers.com/2020/10/customizing-your-package-library-location/ # The .Rprofile changes allow R to be able to use precompiled packages # See https://packagemanager.posit.co/client/#/repos/cran/setup -RUN mkdir -p ${WORKDIR}/.rlibs \ - && printf "\nR_LIBS_SITE=\"%s/.rlibs\"\n" "${WORKDIR}" >> /home/${SESSION_USER}/.Renviron \ - && printf "\noptions(repos = c(CRAN = \"https://packagemanager.posit.co/cran/__linux__/bookworm/latest\"))\n" >> /home/${SESSION_USER}/.Rprofile +RUN printf "\nR_LIBS_SITE=\"%s/.rlibs\"\n" "${MOUNTDIR}" >> /home/${SESSION_USER}/.Renviron \ + && printf "\noptions(repos = c(CRAN = \"https://packagemanager.posit.co/cran/__linux__/bookworm/latest\"))\n" >> /home/${SESSION_USER}/.Rprofile +ENTRYPOINT ["tini", "--", "sh", "-c"] +CMD ["mkdir -p ${__MOUNTDIR__}/.rlibs && bash /entrypoint.sh"] diff --git a/docker/vscode/base.Dockerfile b/docker/vscode/base.Dockerfile index f1326c48..ada95cfd 100644 --- a/docker/vscode/base.Dockerfile +++ b/docker/vscode/base.Dockerfile @@ -2,7 +2,8 @@ ARG BASE_IMAGE=debian:bookworm FROM $BASE_IMAGE ARG VSCODIUM_VERSION=1.95.2.24313 ARG SESSION_USER=vscode -ARG WORKDIR=/home/${SESSION_USER}/work +ARG WORKDIR=/home/${SESSION_USER} +ARG MOUNTDIR=${WORKDIR}/work SHELL [ "/bin/bash", "-c", "-o", "pipefail" ] RUN apt-get update && \ apt-get install -y --no-install-recommends ca-certificates curl tini build-essential git git-lfs && \ @@ -10,10 +11,13 @@ RUN apt-get update && \ curl -L https://github.com/VSCodium/vscodium/releases/download/${VSCODIUM_VERSION}/vscodium-reh-web-linux-x64-${VSCODIUM_VERSION}.tar.gz | tar -xz -C /codium-server && \ rm -rf /var/lib/apt/lists/* RUN useradd -m -s /bin/bash ${SESSION_USER} +ENV LANG=C.UTF-8 +ENV LC_ALL=C.UTF-8 USER ${SESSION_USER} COPY entrypoint.sh /entrypoint.sh WORKDIR ${WORKDIR} # We are setting this to a weird double underscore name to avoid collisions with user-set vars -ENV __WORKDIR__=${WORKDIR} +ENV __MOUNTDIR__=${MOUNTDIR} +RUN mkdir -p ${MOUNTDIR} ENTRYPOINT ["tini", "--", "/bin/bash", "/entrypoint.sh"] diff --git a/docker/vscode/conda.Dockerfile b/docker/vscode/conda.Dockerfile index 6516add8..c86f63dd 100644 --- a/docker/vscode/conda.Dockerfile +++ b/docker/vscode/conda.Dockerfile @@ -7,8 +7,9 @@ ARG PYTHON_VERSION=3.12.7 ARG OS=linux ARG ARCH=64 ARG SESSION_USER=vscode -ARG WORKDIR=/home/${SESSION_USER}/work -ARG VENVS_PATH=${WORKDIR}/.venvs +ARG WORKDIR=/home/${SESSION_USER} +ARG MOUNTDIR=${WORKDIR}/work +ARG VENVS_PATH=${MOUNTDIR}/.venvs ENV __VENVS_PATH__=${VENVS_PATH} ENV __PYTHON_VERSION__=${PYTHON_VERSION} ENV __MAMBA_VERSION__=${MAMBA_VERSION} @@ -23,5 +24,6 @@ RUN apt-get update && \ USER ${SESSION_USER} WORKDIR ${WORKDIR} +ENV __MOUNTDIR__=${MOUNTDIR} ENTRYPOINT ["tini", "--", "sh", "-c"] CMD ["set -ex && micromamba install --yes --root-prefix=${__VENVS_PATH__} --prefix=${__VENVS_PATH__} python=${__PYTHON_VERSION__} mamba=${__MAMBA_VERSION__} conda=${__CONDA_VERSION__} && ${__VENVS_PATH__}/bin/mamba init && ${__VENVS_PATH__}/bin/conda config --add channels conda-forge && ${__VENVS_PATH__}/bin/conda config --set channel_priority strict && bash /entrypoint.sh"] diff --git a/docker/vscode/entrypoint.sh b/docker/vscode/entrypoint.sh index ff32bd5e..2d3d9bb9 100644 --- a/docker/vscode/entrypoint.sh +++ b/docker/vscode/entrypoint.sh @@ -1,12 +1,12 @@ set -ex -WORKDIR=${__WORKDIR__} -mkdir -p "${WORKDIR}/.vscode/extensions" +MOUNTDIR=${__MOUNTDIR__} +mkdir -p "${MOUNTDIR}/.vscode/extensions" /codium-server/bin/codium-server \ --server-base-path "$RENKU_BASE_URL_PATH/" \ --without-connection-token \ --host 0.0.0.0 \ --port 8888 \ - --extensions-dir "${WORKDIR}/.vscode/extensions" \ + --extensions-dir "${MOUNTDIR}/.vscode/extensions" \ --accept-server-license-terms \ --telemetry-level off \ - --server-data-dir "${WORKDIR}/.vscode" + --server-data-dir "${MOUNTDIR}/.vscode" diff --git a/docker/vscode/poetry.Dockerfile b/docker/vscode/poetry.Dockerfile index d673907e..07935fee 100644 --- a/docker/vscode/poetry.Dockerfile +++ b/docker/vscode/poetry.Dockerfile @@ -5,8 +5,9 @@ ARG PYTHON_VERSION=3.12.7 # Empty string for poetry version means the latest version ARG POETRY_VERSION="" ARG SESSION_USER=vscode -ARG WORKDIR=/home/${SESSION_USER}/work -ARG VENVS_PATH=${WORKDIR}/.venvs +ARG WORKDIR=/home/${SESSION_USER} +ARG MOUNTDIR=${WORKDIR}/work +ARG VENVS_PATH=${MOUNTDIR}/.venvs SHELL [ "/bin/bash", "-c", "-o", "pipefail" ] USER root RUN apt-get update && \ @@ -19,6 +20,7 @@ RUN apt-get update && \ rm -rf /var/lib/apt/lists/* USER ${SESSION_USER} +ENV __MOUNTDIR__=${MOUNTDIR} RUN curl -sSL https://install.python-poetry.org | python3 - --version=${POETRY_VERSION} && \ /home/${SESSION_USER}/.local/bin/poetry config virtualenvs.path ${VENVS_PATH} WORKDIR ${WORKDIR} From 93408fe2075e2a381ccc2744f3cd5709765a320b Mon Sep 17 00:00:00 2001 From: Tasko Olevski Date: Tue, 26 Nov 2024 10:17:08 +0100 Subject: [PATCH 17/20] squashme: set root dir for jupyter python images --- docker/py/entrypoint.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docker/py/entrypoint.sh b/docker/py/entrypoint.sh index e784f343..7c8e3da3 100755 --- a/docker/py/entrypoint.sh +++ b/docker/py/entrypoint.sh @@ -57,7 +57,8 @@ jupyter() { if [[ -v RENKU_BASE_URL_PATH ]]; then "$@" --ServerApp.port=8888 --ServerApp.base_url="$RENKU_BASE_URL_PATH" \ --ServerApp.token="" --ServerApp.password="" --ServerApp.allow_remote_access=true \ - --ContentsManager.allow_hidden=true --ServerApp.allow_origin=* + --ContentsManager.allow_hidden=true --ServerApp.allow_origin=* \ + --ServerApp.root_dir="${HOME}/work" fi # run the command From d0c665dc7631d63a96d3c201d5103c3d5da1836e Mon Sep 17 00:00:00 2001 From: Tasko Olevski Date: Tue, 26 Nov 2024 10:17:22 +0100 Subject: [PATCH 18/20] squashme: fully remove defaults channel for conda --- docker/vscode/conda.Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/vscode/conda.Dockerfile b/docker/vscode/conda.Dockerfile index c86f63dd..5e6b595d 100644 --- a/docker/vscode/conda.Dockerfile +++ b/docker/vscode/conda.Dockerfile @@ -26,4 +26,4 @@ USER ${SESSION_USER} WORKDIR ${WORKDIR} ENV __MOUNTDIR__=${MOUNTDIR} ENTRYPOINT ["tini", "--", "sh", "-c"] -CMD ["set -ex && micromamba install --yes --root-prefix=${__VENVS_PATH__} --prefix=${__VENVS_PATH__} python=${__PYTHON_VERSION__} mamba=${__MAMBA_VERSION__} conda=${__CONDA_VERSION__} && ${__VENVS_PATH__}/bin/mamba init && ${__VENVS_PATH__}/bin/conda config --add channels conda-forge && ${__VENVS_PATH__}/bin/conda config --set channel_priority strict && bash /entrypoint.sh"] +CMD ["set -ex && micromamba install --yes --root-prefix=${__VENVS_PATH__} --prefix=${__VENVS_PATH__} python=${__PYTHON_VERSION__} mamba=${__MAMBA_VERSION__} conda=${__CONDA_VERSION__} && ${__VENVS_PATH__}/bin/mamba init && ${__VENVS_PATH__}/bin/conda config --add channels conda-forge && ${__VENVS_PATH__}/bin/conda config --set channel_priority strict && ${__VENVS_PATH__}/bin/conda config --remove channels defaults && bash /entrypoint.sh"] From 6c4e9803a19ecd365aaf13dad1dc47ca0bddb7e9 Mon Sep 17 00:00:00 2001 From: Tasko Olevski Date: Wed, 27 Nov 2024 21:23:12 +0100 Subject: [PATCH 19/20] squashme: remove readme file --- docker/vscode/README.md | 8 -------- 1 file changed, 8 deletions(-) delete mode 100644 docker/vscode/README.md diff --git a/docker/vscode/README.md b/docker/vscode/README.md deleted file mode 100644 index 709a100c..00000000 --- a/docker/vscode/README.md +++ /dev/null @@ -1,8 +0,0 @@ -# Images with VSCodium - -The devcontainer images here are a great base for this: -https://hub.docker.com/r/microsoft/vscode-devcontainers - -They do not contain vscode in them. They contain an executable -that is called `code` but that is just a shell script that -prints a message that VSCode is not installed. From fe3f19549c4574eed4ac3488d8a003553e97e57c Mon Sep 17 00:00:00 2001 From: Tasko Olevski Date: Wed, 27 Nov 2024 21:23:58 +0100 Subject: [PATCH 20/20] squashme: make base image be ubuntu not debian --- .../workflows/build-and-push-to-docker.yml | 26 +++++++++---------- docker/vscode/R.Dockerfile | 4 +-- docker/vscode/base.Dockerfile | 2 +- 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/.github/workflows/build-and-push-to-docker.yml b/.github/workflows/build-and-push-to-docker.yml index 7dbe1ba4..43d72b9c 100644 --- a/.github/workflows/build-and-push-to-docker.yml +++ b/.github/workflows/build-and-push-to-docker.yml @@ -711,8 +711,8 @@ jobs: fail-fast: true matrix: include: - - BASE_IMAGE: debian:bookworm - BASE_IMAGE_TAG: debian + - BASE_IMAGE: ubuntu:24.04 + BASE_IMAGE_TAG: ubuntu LATEST: true steps: - name: Docker Login @@ -757,14 +757,14 @@ jobs: matrix: include: - PYTHON_VERSION: 3.12.7 - BASE_IMAGE_TAG: debian + BASE_IMAGE_TAG: ubuntu LATEST: true - PYTHON_VERSION: 3.11.10 - BASE_IMAGE_TAG: debian - LATEST: true + BASE_IMAGE_TAG: ubuntu + LATEST: false - PYTHON_VERSION: 3.10.15 - BASE_IMAGE_TAG: debian - LATEST: true + BASE_IMAGE_TAG: ubuntu + LATEST: false steps: - name: Docker Login uses: docker/login-action@v3 @@ -814,17 +814,17 @@ jobs: matrix: include: - PYTHON_VERSION: 3.12.7 - BASE_IMAGE_TAG: debian + BASE_IMAGE_TAG: ubuntu PYENV_VERSION: v2.4.17 POETRY_VERSION: 1.8.4 LATEST: true - PYTHON_VERSION: 3.11.10 - BASE_IMAGE_TAG: debian + BASE_IMAGE_TAG: ubuntu PYENV_VERSION: v2.4.17 POETRY_VERSION: 1.8.4 LATEST: false - PYTHON_VERSION: 3.10.15 - BASE_IMAGE_TAG: debian + BASE_IMAGE_TAG: ubuntu PYENV_VERSION: v2.4.17 POETRY_VERSION: 1.8.4 LATEST: false @@ -880,13 +880,13 @@ jobs: matrix: include: - R_VERSION: 4.4.2 - BASE_IMAGE_TAG: debian + BASE_IMAGE_TAG: ubuntu LATEST: true - R_VERSION: 4.3.3 - BASE_IMAGE_TAG: debian + BASE_IMAGE_TAG: ubuntu LATEST: false - R_VERSION: 4.2.3 - BASE_IMAGE_TAG: debian + BASE_IMAGE_TAG: ubuntu LATEST: false steps: - name: Docker Login diff --git a/docker/vscode/R.Dockerfile b/docker/vscode/R.Dockerfile index 3ec45f74..6e4afdef 100644 --- a/docker/vscode/R.Dockerfile +++ b/docker/vscode/R.Dockerfile @@ -8,7 +8,7 @@ ARG MOUNTDIR=${WORKDIR}/work SHELL [ "/bin/bash", "-c", "-o", "pipefail" ] USER root # From https://docs.posit.co/resources/install-r.html -RUN curl -O https://cdn.rstudio.com/r/debian-12/pkgs/r-${R_VERSION}_1_amd64.deb \ +RUN curl -O https://cdn.rstudio.com/r/ubuntu-2404/pkgs/r-${R_VERSION}_1_amd64.deb \ && apt-get update \ && apt-get install -y --no-install-recommends ./r-${R_VERSION}_1_amd64.deb \ && rm -rf /var/lib/apt/lists/* \ @@ -24,6 +24,6 @@ WORKDIR ${WORKDIR} # The .Rprofile changes allow R to be able to use precompiled packages # See https://packagemanager.posit.co/client/#/repos/cran/setup RUN printf "\nR_LIBS_SITE=\"%s/.rlibs\"\n" "${MOUNTDIR}" >> /home/${SESSION_USER}/.Renviron \ - && printf "\noptions(repos = c(CRAN = \"https://packagemanager.posit.co/cran/__linux__/bookworm/latest\"))\n" >> /home/${SESSION_USER}/.Rprofile + && printf "\noptions(repos = c(CRAN = \"https://packagemanager.posit.co/cran/__linux__/noble/latest\"))\n" >> /home/${SESSION_USER}/.Rprofile ENTRYPOINT ["tini", "--", "sh", "-c"] CMD ["mkdir -p ${__MOUNTDIR__}/.rlibs && bash /entrypoint.sh"] diff --git a/docker/vscode/base.Dockerfile b/docker/vscode/base.Dockerfile index ada95cfd..d5de0707 100644 --- a/docker/vscode/base.Dockerfile +++ b/docker/vscode/base.Dockerfile @@ -1,4 +1,4 @@ -ARG BASE_IMAGE=debian:bookworm +ARG BASE_IMAGE=ubuntu:24.04 FROM $BASE_IMAGE ARG VSCODIUM_VERSION=1.95.2.24313 ARG SESSION_USER=vscode