-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support Podman #197
Support Podman #197
Changes from all commits
c75a7f8
8b41ba4
a4bc1f8
aed5916
dba82bb
3ea0a88
ab3f94b
3ea81f1
aa626e0
08a4675
7c2a7d0
5d58daf
fb3f9fe
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. docker registry has a quite strict API rate limits. What about using There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Well, it's currently dockerhub. The API rate limits should not really apply to users of I think it's better to keep using dockerhub for production images and |
||
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"]) | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Podman seems to autoassign random port, so the tests were failing for me locally. |
||
yield None | ||
|
||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!