From d2ff350d1b7482068cfabce64301d915a41ba0df Mon Sep 17 00:00:00 2001 From: AaronDC60 Date: Sun, 31 May 2026 13:09:59 +0200 Subject: [PATCH 1/7] Add different platforms --- .github/workflows/publish_docker.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/publish_docker.yml b/.github/workflows/publish_docker.yml index 9497bdc..b304c03 100644 --- a/.github/workflows/publish_docker.yml +++ b/.github/workflows/publish_docker.yml @@ -40,6 +40,12 @@ jobs: uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7 with: images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} + + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 - name: Build and push Docker image id: push @@ -47,6 +53,7 @@ jobs: with: context: . push: true + platforms: linux/amd64, linux/arm64 tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} From af50013bc0009b50f11aec44364b930265a2dd1b Mon Sep 17 00:00:00 2001 From: AaronDC60 Date: Sun, 31 May 2026 13:24:54 +0200 Subject: [PATCH 2/7] Add tags to the image name --- .github/workflows/publish_docker.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/publish_docker.yml b/.github/workflows/publish_docker.yml index b304c03..b9d408e 100644 --- a/.github/workflows/publish_docker.yml +++ b/.github/workflows/publish_docker.yml @@ -40,6 +40,10 @@ jobs: uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7 with: images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} + tags: | + type=ref,event=branch,enable=${{ github.ref == 'refs/heads/main' }} + type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' }} + type=ref,event=pr - name: Set up QEMU uses: docker/setup-qemu-action@v3 From 814bc35895308c3ae6e1f9d131635f268f819219 Mon Sep 17 00:00:00 2001 From: AaronDC60 Date: Sun, 31 May 2026 13:46:06 +0200 Subject: [PATCH 3/7] build on arm --- .github/workflows/publish_docker.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish_docker.yml b/.github/workflows/publish_docker.yml index b9d408e..69051c5 100644 --- a/.github/workflows/publish_docker.yml +++ b/.github/workflows/publish_docker.yml @@ -14,7 +14,7 @@ env: jobs: build-and-push-image: - runs-on: ubuntu-latest + runs-on: ubuntu-latest-arm permissions: contents: read From 686e8a693f07ffe6dfe175006f3aaa9c6db87210 Mon Sep 17 00:00:00 2001 From: AaronDC60 Date: Sun, 31 May 2026 14:03:56 +0200 Subject: [PATCH 4/7] build on arm --- .github/workflows/publish_docker.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish_docker.yml b/.github/workflows/publish_docker.yml index 69051c5..46ca856 100644 --- a/.github/workflows/publish_docker.yml +++ b/.github/workflows/publish_docker.yml @@ -14,7 +14,7 @@ env: jobs: build-and-push-image: - runs-on: ubuntu-latest-arm + runs-on: ubuntu-24.04-arm permissions: contents: read From 93dd0446fd481fa804307b809c506f8fd6cd7177 Mon Sep 17 00:00:00 2001 From: AaronDC60 Date: Sun, 31 May 2026 14:47:25 +0200 Subject: [PATCH 5/7] Add cache storage for build --- .github/workflows/publish_docker.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/publish_docker.yml b/.github/workflows/publish_docker.yml index 46ca856..f027445 100644 --- a/.github/workflows/publish_docker.yml +++ b/.github/workflows/publish_docker.yml @@ -14,7 +14,7 @@ env: jobs: build-and-push-image: - runs-on: ubuntu-24.04-arm + runs-on: ubuntu-latest permissions: contents: read @@ -60,6 +60,8 @@ jobs: platforms: linux/amd64, linux/arm64 tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} + cache-from: type=gha + cache-to: type=gha, mode=max - name: Generate artifact attestation uses: actions/attest@v4 From d6091482d1fbc0118eb8395dce8b059a073d9a1a Mon Sep 17 00:00:00 2001 From: AaronDC60 Date: Sun, 31 May 2026 15:57:19 +0200 Subject: [PATCH 6/7] Update documentation --- .github/workflows/publish_docker.yml | 4 ---- docs/user_guide/installation.rst | 29 ++++++++++++++++------------ 2 files changed, 17 insertions(+), 16 deletions(-) diff --git a/.github/workflows/publish_docker.yml b/.github/workflows/publish_docker.yml index f027445..a36af61 100644 --- a/.github/workflows/publish_docker.yml +++ b/.github/workflows/publish_docker.yml @@ -4,9 +4,6 @@ on: push: branches: - main - pull_request: - branches: - - 'main' env: REGISTRY: ghcr.io @@ -43,7 +40,6 @@ jobs: tags: | type=ref,event=branch,enable=${{ github.ref == 'refs/heads/main' }} type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' }} - type=ref,event=pr - name: Set up QEMU uses: docker/setup-qemu-action@v3 diff --git a/docs/user_guide/installation.rst b/docs/user_guide/installation.rst index 3e9d974..56af51b 100644 --- a/docs/user_guide/installation.rst +++ b/docs/user_guide/installation.rst @@ -12,28 +12,33 @@ Installation using Docker ------------------------- First `install Docker `_. -Then clone the GitHub repository and build the Docker image. +Create or navigate to the folder that contains all input files necessary for the data analysis and save the following block of code as a file named `docker-compose.yml`: -.. code-block:: bash +.. code-block:: yaml - git clone --recursive git@github.com:DM-Lab-UvA/MinCompSpin.git - cd MinCompSpin - docker build -t mincompspin . + services: + mincompspin: + image: ghcr.io/dm-lab-uva/mincompspin:latest + ports: + - "8888:8888" + volumes: + - .:/MinCompSpin + command: jupyter notebook --ip=0.0.0.0 --no-browser --allow-root -After building the image, you can run the container: +To launch the container environment, open a terminal in your directory and execute the following command: .. code-block:: bash - docker run -p 8888:8888 -it mincompspin + docker compose up -To run a Jupyter notebook in the Docker container +When running the command for the first time, it will download the pre-built Docker image and automatically start a jupyter server. +This returns a link beginning with ``127.0.0.1``, which can be opened in a local browser. +Next times, it will not download the latest Docker image but just launch a container with this downloaded version. +If a newer version of the image exists, run the following command first: .. code-block:: bash - jupyter notebook --ip=0.0.0.0 --no-browser --allow-root - -This returns a link beginning with ``127.0.0.1``, which can be opened in a local browser. - + docker compose pull Local installation using CMake ------------------------------ From 13113012a3d592e20d14331db9ae89359ecfe972 Mon Sep 17 00:00:00 2001 From: AaronDC60 Date: Sun, 31 May 2026 16:01:48 +0200 Subject: [PATCH 7/7] Use more cores for build --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 0b7d7de..1ff2555 100644 --- a/Dockerfile +++ b/Dockerfile @@ -25,7 +25,7 @@ COPY . . RUN mkdir build && cd build && \ cmake .. && \ - make + make -j$(nproc) RUN cd build/mcmpy && \ /opt/venv/bin/pip install .