-
Notifications
You must be signed in to change notification settings - Fork 25
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
Show where to store images in the lima instance #235
Conversation
@@ -216,6 +216,30 @@ supported by {Project}. To see a comparison of the {Project} | |||
definition file with Dockerfile, please see: :ref:`this section | |||
<sec:deffile-vs-dockerfile>`. | |||
|
|||
.. note:: |
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.
Since this is talking about accessing files, I think this would be better at the end of the Working with files
section. It's only there that the concept of mounting home directories is introduced.
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.
Also put a label here and refer to it from the admin docs, if this is going to be the only place where the user interaction with Lima is going to be documented. I'm not completely convinced that it shouldn't have its own separate page in the user doc, but I'm ok with this for now at least.
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.
The rest of the page should work as-is, it is only the ones that reference a file in the current directory (assumed to be the home directory, or a subfolder thereof) that risk failing the "getting started" (due to read-only file system).
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.
I will leave the user working with remote filesystems for the "hello world", and then come back to using local filesystems in the working with files section (that is mostly about mounting remote files, but anyway)
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.
Hmm, I was not able to fit the location of the .sif files (on the VM) with the mounting of the host $HOME...
Maybe it needs to move to a separate page, or maybe a separate section to not have to duplicate commands?
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.
Will zoom out from the quick start and see where such a separate page would fit, in the user docs.
https://apptainer.org/docs/user/latest/
Should that be using $HOME, or is it actually only mounting |
While it is possible to shell into the virtual machine, it is also possible to call apptainer.lima on the host. This makes it easier to interact with the local files, and to copy the resulting SIF files to another location. Signed-off-by: Anders F Björklund <[email protected]>
7834885
to
517d399
Compare
@afbjorklund This is still waiting on you. However I think your question is probably addressed in sylabs/singularity-userdocs#198 which we plan to import via #239. |
Thanks for the reminder, if it needs clarification after your updates we can come back to it and open another PR (if so) |
I didn't mean it answered the entire question of the PR, that of showing where to store images in the lima instance. I just meant that it answers your last question regarding |
As far as I understand, there is no "standard" location for the images (sifs) - like there is with The cache directories under the (instance) $HOME work fine, like when it is auto-converting a docker:// reference. So in some sense it is using |
Also this is something that could use some more feedback, from actual users of Apptainer "on" their Mac hosts. |
Yeah I really don't understand the issue since I'm not a user. I recall trying it on my old Mac but now my Mac has an Apple M2 so I assume it won't be able to use x86_64 containers anymore anyway. If you wanted to recommend that people put things under |
From the "getting started", these commands work OOTB: $ apptainer --debug run docker://alpine
$ apptainer run --containall docker://alpine
These are failing due to the default of having a read-only home: $ apptainer pull docker://alpine
$ apptainer build alpine.sif docker://alpine
$ apptainer pull docker://ghcr.io/apptainer/lolcow
This "works", but does not have great performance for big images: $ apptainer build /tmp/lima/lolcow_latest.sif docker://ghcr.io/apptainer/lolcow
$ cp /tmp/lima/lolcow_latest.sif .
$ apptainer run lolcow_latest.sif Due to having to "scp" the .sif image, from the VM and to the VM. |
You can use the binaries (without rebuilding them), but only through qemu-user or Rosetta emulation. Theoretically you can run the whole VM in emulation but it is rather slow, though useful for e.g. RISC-V |
Description of the Pull Request (PR):
While it is possible to shell into the virtual machine, it is also possible to call apptainer.lima on the host.
This makes it easier to interact with the local files, and to copy the resulting SIF files to another location.
Currently this is not really showing the interaction from the host, since it is assumed to be "as normal".
Just details on where the images can be stored, in order to 1) be used in the guest 2) be used on the host
This fixes or addresses the following GitHub issues:
Unfortunately Sphinx doesn't like PS1, which makes the prompts somewhat confusing.
But hopefully people can sort it out anyway? It's not so different from when using
ssh
.Notes
limactl shell
is a command for sshlima
is a shell wrapper forlimactl shell
apptainer.lima
is a shell wrapper forlima apptainer
So the end result is similar to running :
ssh lima-apptainer apptainer
, with variables.The most useful one being APPTAINER_BINDPATH, for mounting
/Users/$USER
too.In case you haven't seen Lima before, the "lima-apptainer" is a Linux Machine (LiMa)
Normally it is a VM running locally, but it could be a physical server or a cloud server.