diff --git a/.github/dependabot.yaml b/.github/dependabot.yaml index c4f7385..d781b37 100644 --- a/.github/dependabot.yaml +++ b/.github/dependabot.yaml @@ -10,4 +10,9 @@ updates: directories: - 'src/**/*' schedule: - interval: 'daily' \ No newline at end of file + interval: 'daily' + - package-ecosystem: 'pip' + directories: + - 'src/dockerfiles/jupyter-gap/ubuntu-2204-lts/' + schedule: + interval: 'daily' diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 16d755d..c018a41 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -46,7 +46,8 @@ jobs: operating-system-base: ${{ fromJSON(needs.define-matrix.outputs.systems) }} uses: ./.github/workflows/worflow-dispatch-build.yaml with: - gap-build: bare + gap-type: gap + target: bare gap-version: ${{ matrix.gap-version }} operating-system-base: ${{ matrix.operating-system-base }} @@ -61,7 +62,8 @@ jobs: operating-system-base: ${{ fromJSON(needs.define-matrix.outputs.systems) }} uses: ./.github/workflows/worflow-dispatch-build.yaml with: - gap-build: slim + gap-type: gap + target: slim gap-version: ${{ matrix.gap-version }} operating-system-base: ${{ matrix.operating-system-base }} @@ -77,6 +79,25 @@ jobs: operating-system-base: ${{ fromJSON(needs.define-matrix.outputs.systems) }} uses: ./.github/workflows/worflow-dispatch-build.yaml with: - gap-build: full + gap-type: gap + target: full + gap-version: ${{ matrix.gap-version }} + operating-system-base: ${{ matrix.operating-system-base }} + + build-full-jupyter: + needs: + - define-matrix + - build-bare + - build-slim + - build-full + strategy: + fail-fast: true + matrix: + gap-version: ${{ fromJSON(needs.define-matrix.outputs.versions) }} + operating-system-base: ${{ fromJSON(needs.define-matrix.outputs.systems) }} + uses: ./.github/workflows/worflow-dispatch-build.yaml + with: + gap-type: jupyter-gap + target: full gap-version: ${{ matrix.gap-version }} operating-system-base: ${{ matrix.operating-system-base }} diff --git a/.github/workflows/worflow-dispatch-build.yaml b/.github/workflows/worflow-dispatch-build.yaml index b3bcea8..9fa901b 100644 --- a/.github/workflows/worflow-dispatch-build.yaml +++ b/.github/workflows/worflow-dispatch-build.yaml @@ -3,10 +3,13 @@ name: Docker - build and publish image on: workflow_call: inputs: + gap-type: + required: true + type: string gap-version: required: true type: string - gap-build: + target: required: true type: string operating-system-base: @@ -30,10 +33,10 @@ jobs: uses: docker/metadata-action@v5 with: images: | - name=ghcr.io/${{ github.repository }} + name=ghcr.io/${{ github.repository_owner }}/${{ inputs.gap-type }} tags: | type=sha,priority=100 - type=raw,priority=900,value=${{ inputs.gap-version }}-${{ inputs.gap-build }} + type=raw,priority=900,value=${{ inputs.gap-version }}-${{ inputs.target }} - name: 📦 docker -- login to ghcr-registry @@ -54,12 +57,12 @@ jobs: - name: 🐬 docker -- build and push uses: docker/build-push-action@v6 with: - context: ./src/dockerfiles/${{ inputs.operating-system-base }} - file: ./src/dockerfiles/${{ inputs.operating-system-base }}/Dockerfile + context: ./src/dockerfiles/${{ inputs.gap-type}}/${{ inputs.operating-system-base }} + file: ./src/dockerfiles/${{ inputs.gap-type}}/${{ inputs.operating-system-base }}/Dockerfile push: ${{ github.ref == 'refs/heads/main' && github.event_name == 'push' }} tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} - target: ${{ inputs.gap-build }} + target: ${{ inputs.target }} cache-from: type=gha cache-to: type=gha,mode=max` build-args: | diff --git a/src/dockerfiles/ubuntu-2204-lts/Dockerfile b/src/dockerfiles/gap/ubuntu-2204-lts/Dockerfile similarity index 100% rename from src/dockerfiles/ubuntu-2204-lts/Dockerfile rename to src/dockerfiles/gap/ubuntu-2204-lts/Dockerfile diff --git a/src/dockerfiles/jupyter-gap/ubuntu-2204-lts/Dockerfile b/src/dockerfiles/jupyter-gap/ubuntu-2204-lts/Dockerfile new file mode 100644 index 0000000..f7ad712 --- /dev/null +++ b/src/dockerfiles/jupyter-gap/ubuntu-2204-lts/Dockerfile @@ -0,0 +1,46 @@ +## {{{ +ARG GAP_VERSION="4.12.1" +ARG DOCKER_BASE_IMAGE_URL="ghcr.io/limakzi/gap-docker:${GAP_VERSION}-full" +## }}} + +## {{{ +ARG JUPYTER_KERNEL_PATH="/opt/gap/gap-${GAP_VERSION}/pkg/jupyterkernel/" +## }}} + +## {{{ +ARG GAP_USER_USERNAME="gap" +ARG GAP_USER_GROUPNAME="gap" +ARG GAP_USER_UID=1000 +ARG GAP_USER_GID=1000 +ARG GAP_USER_SHELL="/bin/bash" +ARG GAP_USER_HOMEDIR="/opt/gap" +## }}} + +FROM ${DOCKER_BASE_IMAGE_URL} AS full + +EXPOSE 8888 + +ARG GAP_USER_GID +ARG GAP_USER_GROUPNAME +ARG GAP_USER_UID +ARG GAP_USER_USERNAME +ARG GAP_USER_HOMEDIR +ARG JUPYTER_KERNEL_PATH + +USER 'root' + +RUN apt-get -y clean && \ + apt-get -y update && \ + apt-get -y install python3-pip + +USER ${GAP_USER_USERNAME} +ENV PATH="/opt/gap/.local/bin/:${JUPYTER_KERNEL_PATH}/bin/:${PATH}" +ENV JUPYTER_GAP_EXECUTABLE "gap" + +COPY ./requirements.txt ./ +RUN pip3 install -r requirements.txt +RUN pip3 install --no-dependencies ${JUPYTER_KERNEL_PATH} + +WORKDIR "/tmp" + +CMD ["jupyter-lab", "--ip=0.0.0.0"] diff --git a/src/dockerfiles/jupyter-gap/ubuntu-2204-lts/requirements.txt b/src/dockerfiles/jupyter-gap/ubuntu-2204-lts/requirements.txt new file mode 100644 index 0000000..a8e41a9 --- /dev/null +++ b/src/dockerfiles/jupyter-gap/ubuntu-2204-lts/requirements.txt @@ -0,0 +1 @@ +jupyterlab==4.3.3