Skip to content
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

Merged
merged 13 commits into from
Feb 6, 2024
Merged

Support Podman #197

merged 13 commits into from
Feb 6, 2024

Conversation

danielhollas
Copy link
Contributor

@danielhollas danielhollas commented Dec 8, 2023

Podman seems to work out-of-a-box with a little extra setup. I've also tweaked the DEFAULT_IMAGE to include the docker.io/ prefix since that might not be default for Podman.

Closes #196

@danielhollas
Copy link
Contributor Author

I need to dig into the failed tests, apparently caused by the change in the default image.

Copy link

codecov bot commented Jan 22, 2024

Codecov Report

Attention: 2 lines in your changes are missing coverage. Please review.

Comparison is base (57820bc) 86.32% compared to head (fb3f9fe) 85.86%.

Files Patch % Lines
aiidalab_launch/profile.py 75.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #197      +/-   ##
==========================================
- Coverage   86.32%   85.86%   -0.46%     
==========================================
  Files           9        9              
  Lines         914      920       +6     
==========================================
+ Hits          789      790       +1     
- Misses        125      130       +5     
Flag Coverage Δ
py-3.10 85.76% <75.00%> (-0.46%) ⬇️
py-3.11 85.76% <75.00%> (-0.46%) ⬇️
py-3.12 85.76% <75.00%> (-0.46%) ⬇️
py-3.8 85.71% <75.00%> (-0.46%) ⬇️
py-3.9 85.82% <75.00%> (-0.46%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@@ -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)
Copy link
Contributor Author

Choose a reason for hiding this comment

The 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.

Copy link
Member

@unkcpz unkcpz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! I have no podman to test, so I approve it.
Leave a minor open question of which registry to use.

@@ -162,7 +173,7 @@ SOFTWARE.
## Acknowledgements

This work is supported by the
[MARVEL National Centre for Competency in Research](<http://nccr-marvel.ch>) funded by the [Swiss National Science Foundation](<http://www.snf.ch/en>),
[MARVEL National Centre for Competency in Research](<https://nccr-marvel.ch>) funded by the [Swiss National Science Foundation](<https://www.snf.ch/en>),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@@ -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"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

docker registry has a quite strict API rate limits. What about using ghcr.io?

Copy link
Contributor Author

Choose a reason for hiding this comment

The 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 aiidalab-launch for whom downloading a new AiiDAlab image should be a relatively rare operation.

I think it's better to keep using dockerhub for production images and ghcr.io for development. If there's a disagreement on that let's discuss separately.

@danielhollas danielhollas merged commit 3d7c9d2 into main Feb 6, 2024
17 checks passed
@danielhollas danielhollas deleted the podman branch February 6, 2024 16:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support Podman
2 participants