diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fc073ed..86d3fd2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -20,7 +20,7 @@ jobs: python-version: ['3.8', '3.9', '3.10', '3.11', '3.12'] default-image: - '' # use the application default - - aiidalab/aiidalab-docker-stack:latest + - aiidalab/aiidalab-docker-stack:latest # This is the old stack steps: diff --git a/README.md b/README.md index 47fb216..52f215e 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ AiiDAlab Launch makes it easy to run AiiDAlab on your own workstation or laptop. To use AiiDAlab launch you will have to -1. [Install Docker on your workstation or laptop.](https://docs.docker.com/get-docker/) +1. [Install Docker on your workstation or laptop.](https://docs.docker.com/get-docker/) (you can also use Podman, [see below](README.md#using-podman)) 2. Install AiiDAlab launch with [pipx](https://pypa.github.io/pipx/installation/) (**recommended**): ```console @@ -70,6 +70,17 @@ Please see [here](ssh-forward.md) for instructions on how to run AiiDAlab on a r This package follows the Python compatibility and deprecation schedule specified by [NEP 29](https://numpy.org/neps/nep-0029-deprecation_policy.html). +### Using Podman instead of Docker + +You should be able to use Podman as as a drop-in replacement for Docker, with just a little extra setup. The following was tested on Fedora 39 which comes with Podman pre-installed. + +```console +systemctl --user enable podman.socket +systemctl --user start podman.socket +systemctl --user status podman.socket +export DOCKER_HOST=unix:///run/user/$UID/podman/podman.sock +``` + ## Development ### Setting up a development environment @@ -162,7 +173,7 @@ SOFTWARE. ## Acknowledgements This work is supported by the -[MARVEL National Centre for Competency in Research]() funded by the [Swiss National Science Foundation](), +[MARVEL National Centre for Competency in Research]() funded by the [Swiss National Science Foundation](), the MARKETPLACE project funded by [Horizon 2020](https://ec.europa.eu/programmes/horizon2020/) under the H2020-NMBP-25-2017 call (Grant No. 760173), as well as by the [MaX European Centre of Excellence]() funded by the Horizon 2020 EINFRA-5 program, diff --git a/aiidalab_launch/profile.py b/aiidalab_launch/profile.py index e22318e..0b20bed 100644 --- a/aiidalab_launch/profile.py +++ b/aiidalab_launch/profile.py @@ -31,7 +31,9 @@ def _default_port() -> int: # explicit function required to enable test patchin return DEFAULT_PORT -DEFAULT_IMAGE = "aiidalab/full-stack:latest" +DEFAULT_REGISTRY = "docker.io" +DEFAULT_IMAGE_PATH = "aiidalab/full-stack:latest" +DEFAULT_IMAGE = f"{DEFAULT_REGISTRY}/{DEFAULT_IMAGE_PATH}" def _valid_volume_name(source: str) -> None: @@ -158,11 +160,14 @@ def from_container(cls, container: Container) -> Profile: system_user = get_docker_env(container, "SYSTEM_USER") - image_tag = ( - DEFAULT_IMAGE - if DEFAULT_IMAGE in container.image.tags - else container.image.tags[0] - ) + if DEFAULT_IMAGE in container.image.tags: + image_tag = DEFAULT_IMAGE + # Docker seems to strip `docker.io` from the image name + # so we add it back manually. + elif DEFAULT_IMAGE_PATH in container.image.tags: + image_tag = f"{DEFAULT_REGISTRY}/{DEFAULT_IMAGE_PATH}" + else: + image_tag = container.image.tags[0] extra_destinations: list[PurePosixPath] = [ PurePosixPath(mount["Destination"]) diff --git a/tests/conftest.py b/tests/conftest.py index 93c1cc4..226465d 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -78,7 +78,7 @@ def _pull_docker_image(docker_client): # Avoid interfering with used ports on the host system. @pytest.fixture(scope="session", autouse=True) def _default_port(monkeypatch_session): - monkeypatch_session.setattr(aiidalab_launch.profile, "DEFAULT_PORT", None) + monkeypatch_session.setattr(aiidalab_launch.profile, "DEFAULT_PORT", 7777) yield None