Skip to content
Merged
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
15 changes: 12 additions & 3 deletions .github/workflows/publish_docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@ on:
push:
branches:
- main
pull_request:
branches:
- 'main'

env:
REGISTRY: ghcr.io
Expand Down Expand Up @@ -40,15 +37,27 @@ 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' }}

- 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
uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4
with:
context: .
push: true
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
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ COPY . .

RUN mkdir build && cd build && \
cmake .. && \
make
make -j$(nproc)

RUN cd build/mcmpy && \
/opt/venv/bin/pip install .
29 changes: 17 additions & 12 deletions docs/user_guide/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,28 +12,33 @@ Installation using Docker
-------------------------

First `install Docker <https://docs.docker.com/get-started/get-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
------------------------------
Expand Down
Loading