diff --git a/.github/workflows/d4science-images.yml b/.github/workflows/d4science-images.yml index ffe66ee7..f021d853 100644 --- a/.github/workflows/d4science-images.yml +++ b/.github/workflows/d4science-images.yml @@ -24,11 +24,11 @@ jobs: "single-user-sobigdata-aaai24/Dockerfile" "single-user-criticalzone/Dockerfile" "single-user-ecologicalrestorationlab/Dockerfile" - + "single-user-xaiss/Dockerfile" base-image: name: Build base image - needs: detect-changes + needs: detect-changes if: needs.detect-changes.outputs.build-base == 1 runs-on: ubuntu-latest outputs: @@ -89,6 +89,13 @@ jobs: images: eginotebooks/${{ matrix.image }} tags: | type=sha + - name: Docker meta + id: docker_meta_gcp + uses: docker/metadata-action@v5 + with: + images: europe-west4-docker.pkg.dev/d4science-prod-vre-prj/d4science-prod-images/${{ matrix.image }} + tags: | + type=sha - name: Set up QEMU uses: docker/setup-qemu-action@v3 - name: Get previous build base @@ -122,6 +129,14 @@ jobs: docker push ${{ steps.docker_meta.outputs.tags }} docker push eginotebooks/${{ matrix.image }}:latest if: ${{ github.event_name != 'pull_request' }} + # Now do the build adding the GCP extras in + - name: Get ready for GCP + run: | + docker build \ + --build-arg BASE_IMAGE=eginotebooks/${{ matrix.image }}:latest \ + --tag ${{ steps.docker_meta_gcp.outputs.tags }} \ + --tag europe-west4-docker.pkg.dev/d4science-prod-vre-prj/d4science-prod-images/${{ matrix.image }}:latest \ + d4science-gcp - uses: addnab/docker-run-action@v3 with: image: ${{ steps.docker_meta.outputs.tags }} diff --git a/d4science-gcp/Dockerfile b/d4science-gcp/Dockerfile new file mode 100644 index 00000000..b9c11220 --- /dev/null +++ b/d4science-gcp/Dockerfile @@ -0,0 +1,18 @@ +ARG BASE_IMAGE=fake:latest +FROM $BASE_IMAGE + +USER root + +RUN apt-get update \ + && apt-get install --no-install-recommends -y \ + fuse \ + libfuse2 \ + && apt-get clean \ + && rm -rf /var/lib/apt/lists/* + +USER $NB_UID + +ARG FUSE_JAR=https://nexus.d4science.org/nexus/content/repositories/gcube-snapshots/org/gcube/data-access/sh-fuse-integration/1.2.0-SNAPSHOT/sh-fuse-integration-1.2.0-20210708.160531-5-jar-with-dependencies.jar +RUN mamba create -n java8 -q -y openjdk=8 \ + && curl "$FUSE_JAR" > /opt/conda/envs/java8/sh-fuse-integration-jar-with-dependencies.jar \ + && conda clean -tipy diff --git a/single-user-xaiss/Dockerfile b/single-user-xaiss/Dockerfile index 418578a7..f216f77b 100644 --- a/single-user-xaiss/Dockerfile +++ b/single-user-xaiss/Dockerfile @@ -33,3 +33,4 @@ RUN conda install mamba -y --quiet -c conda-forge \ RUN jupyter labextension install @jupyter-widgets/jupyterlab-manager jupyter-leaflet RUN jupyter labextension install jupyterlab-topbar-extension jupyterlab-system-monitor +