Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 27 additions & 10 deletions .github/workflows/build-global-renkulab-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,20 @@ on:

env:
DOCKER_PREFIX: ghcr.io/swissdatasciencecenter/renku
RUN_IMAGE_AMD64: ghcr.io/swissdatasciencecenter/renku-frontend-buildpacks/run-image:0.3.1
BUILDER_IMAGE_AMD64: ghcr.io/swissdatasciencecenter/renku-frontend-buildpacks/selector:0.3.1
RUN_IMAGE_ARM64: ghcr.io/swissdatasciencecenter/renku-frontend-buildpacks/cuda-run-image:0.3.1
BUILDER_IMAGE_ARM64: ghcr.io/swissdatasciencecenter/renku-frontend-buildpacks/cuda-selector:0.3.1
RUN_IMAGE_AMD64: ghcr.io/swissdatasciencecenter/renku-frontend-buildpacks/run-image:0.5.1
BUILDER_IMAGE_AMD64: ghcr.io/swissdatasciencecenter/renku-frontend-buildpacks/selector:0.5.1
RUN_IMAGE_ARM64: ghcr.io/swissdatasciencecenter/renku-frontend-buildpacks/cuda-run-image:0.5.1
BUILDER_IMAGE_ARM64: ghcr.io/swissdatasciencecenter/renku-frontend-buildpacks/cuda-selector:0.5.1

jobs:
build-images:
runs-on: ${{ matrix.PLATFORM == 'linux/arm64' && 'ubuntu-24.04-arm' || 'ubuntu-24.04' }}
strategy:
fail-fast: true
max-parallel: 6
matrix:
LANG_PREFIX:
- py
PLATFORM:
- linux/amd64
- linux/arm64
Expand All @@ -33,6 +36,15 @@ jobs:
- jupyterlab
- vscodium
- ttyd
include:
- LANG_PREFIX: r
PLATFORM: linux/amd64
FLAVOR: basic-r
FRONTEND: rstudio
- LANG_PREFIX: r
PLATFORM: linux/arm64
FLAVOR: basic-r
FRONTEND: rstudio
steps:
- name: Checkout repository
uses: actions/checkout@v5
Expand All @@ -48,14 +60,14 @@ jobs:
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.DOCKER_PREFIX }}/py-${{ matrix.FLAVOR }}-${{ matrix.FRONTEND }}
images: ${{ env.DOCKER_PREFIX }}/${{ matrix.LANG_PREFIX }}-${{ matrix.FLAVOR }}-${{ matrix.FRONTEND }}
tags: |
type=sha,prefix=${{ matrix.PLATFORM == 'linux/arm64' && 'arm64' || 'amd64' }}-
- name: Docker meta cache
id: meta_cache
uses: docker/metadata-action@v5
with:
images: ${{ env.DOCKER_PREFIX }}/py-${{ matrix.FLAVOR }}-${{ matrix.FRONTEND }}-cache
images: ${{ env.DOCKER_PREFIX }}/${{ matrix.LANG_PREFIX }}-${{ matrix.FLAVOR }}-${{ matrix.FRONTEND }}-cache
tags: |
type=raw,value=${{ matrix.PLATFORM == 'linux/arm64' && 'arm64' || 'amd64' }}
- name: Setup pack
Expand Down Expand Up @@ -96,6 +108,7 @@ jobs:
runs-on: ubuntu-24.04
strategy:
fail-fast: true
max-parallel: 6
matrix:
FLAVOR:
- basic
Expand All @@ -104,6 +117,10 @@ jobs:
- jupyterlab
- vscodium
- ttyd
include:
- LANG_PREFIX: r
FLAVOR: basic-r
FRONTEND: rstudio
steps:
- name: Checkout repository
uses: actions/checkout@v5
Expand All @@ -121,9 +138,9 @@ jobs:
env:
DOCKER_METADATA_ANNOTATIONS_LEVELS: index
with:
images: ${{ env.DOCKER_PREFIX }}/py-${{ matrix.FLAVOR }}-${{ matrix.FRONTEND }}
images: ${{ env.DOCKER_PREFIX }}/${{ matrix.LANG_PREFIX }}-${{ matrix.FLAVOR }}-${{ matrix.FRONTEND }}
annotations: |
org.opencontainers.image.title=renku/py-${{ matrix.FLAVOR }}-${{ matrix.FRONTEND }}
org.opencontainers.image.title=renku/${{ matrix.LANG_PREFIX }}-${{ matrix.FLAVOR }}-${{ matrix.FRONTEND }}
org.opencontainers.image.description=An image for renku sessions, with ${{ matrix.FLAVOR }} Python packages and a ${{ matrix.FRONTEND }} frontend.
tags: |
type=sha,prefix=
Expand All @@ -133,14 +150,14 @@ jobs:
id: meta_amd64
uses: docker/metadata-action@v5
with:
images: ${{ env.DOCKER_PREFIX }}/py-${{ matrix.FLAVOR }}-${{ matrix.FRONTEND }}
images: ${{ env.DOCKER_PREFIX }}/${{ matrix.LANG_PREFIX }}-${{ matrix.FLAVOR }}-${{ matrix.FRONTEND }}
tags: |
type=sha,prefix=amd64-
- name: Docker meta arm64
id: meta_arm64
uses: docker/metadata-action@v5
with:
images: ${{ env.DOCKER_PREFIX }}/py-${{ matrix.FLAVOR }}-${{ matrix.FRONTEND }}
images: ${{ env.DOCKER_PREFIX }}/${{ matrix.LANG_PREFIX }}-${{ matrix.FLAVOR }}-${{ matrix.FRONTEND }}
tags: |
type=sha,prefix=arm64-
- name: Combine images
Expand Down
32 changes: 28 additions & 4 deletions global-images/Makefile
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
FRONTEND ?= vscodium
BUILDER ?= ghcr.io/swissdatasciencecenter/renku-frontend-buildpacks/selector:0.0.8
RUN_IMAGE ?= ghcr.io/swissdatasciencecenter/renku-frontend-buildpacks/base-image:0.0.8
BUILDER ?= ghcr.io/swissdatasciencecenter/renku-frontend-buildpacks/selector:0.5.1
RUN_IMAGE ?= ghcr.io/swissdatasciencecenter/renku-frontend-buildpacks/base-image:0.5.1
GIT_SHA := $(shell git rev-parse --short=7 HEAD)

.PHONY: all basic datascience
.PHONY: all basic datascience r-basic

all: basic datascience
all: basic datascience r-basic

basic datascience:
@BASE=$@; \
Expand All @@ -30,3 +30,27 @@ basic datascience:
--tag $$TAGS \
$$PUBLISH_FLAG \
$$EXTRA_FLAGS

r-basic:
@BASE=$@; \
PUBLISH_FLAG=""; \
if [ "$${PUBLISH:-}" = "1" ]; then PUBLISH_FLAG="--publish"; fi; \
if [ -n "$$DOCKER_PREFIX" ]; then \
case "$$DOCKER_PREFIX" in \
*/) FINAL_PREFIX="$$DOCKER_PREFIX";; \
*) FINAL_PREFIX="$$DOCKER_PREFIX/";; \
esac; \
else \
FINAL_PREFIX=""; \
fi; \
TAGS=$${TAGS:-$${FINAL_PREFIX}r-$$BASE-$(FRONTEND):$(GIT_SHA)}; \
echo "Building from \"$$BASE\" sub-directory"; \
FIRST_TAG=$${TAGS%%,*}; \
pack build $$FIRST_TAG \
-p $$BASE \
--builder $(BUILDER) \
--run-image $(RUN_IMAGE) \
--env BP_RENKU_FRONTENDS=$(FRONTEND) \
--tag $$TAGS \
$$PUBLISH_FLAG \
$$EXTRA_FLAGS
7 changes: 7 additions & 0 deletions global-images/basic-r/renv.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"R": {
"Version": "4.5.3",
"Repositories": []
},
"Packages": {}
}
Loading