Open pagrubel opened 6 years ago
Patricia, thanks for the new issue!
We have not previously considered OS X because it doesn't have the namespace system calls we use to run containers.
Could you tell us more about your use case and the workflow you envision? If we can be persuaded it fits Charliecloud's vision, then we'd love to see a PR.
Regarding the specific compile failure above, that's because we use the argp
functions in glibc. I don't know how one might make them available on OS X.
We'd like to be able to build the container on mac and run them on the HPC systems.
OK. Can you explain this use case in more detail? I'm still a little confused because even if you can successfully build images, you won't be able to run them, even for a sanity check.
Alternately, you can run Charliecloud in a virtual machine on your Mac: https://hpc.github.io/charliecloud/virtualbox.html. It works quite well, and since you're at LANL I can provide a pre-built image file if you like (e-mail me internally and I'll send you the link).
I will use a platform like Darwin to test for use case. I will look into the virtual case as well as seeing if I can solve this problem.
Hey there,
I was looking into installing charliecloud on mac as well in order to create tarballs from my docker images using ch-builder2tar
which I can then upload to the server running charliecloud.
As the VM solution seems like quite a bit of overhead for this purpose, I was wondering if tarballs created with docker save
would be compatible with charliecloud's ch-tar2dir
?
Thanks a lot in advance!
Hello @le-ander! ch-run
needs a flattened filesystem tree (directory or squashfs).
docker save
produces a tarred repository, which contains all parent layers and corresponding meta data (hash directories, layer tarballs, json, etc.), which wouldn't work:
If you wanted to create charliecloud compatible tarballs (flattened filesystem images) , you'd want to use docker create
in conjunction with docker export
:
Hope this helps.
This is great, thanks a ton!
I'll add that there's no fundamental reason that the building-related scripts could not run on MacOS, so if you're interested in writing a patch, we should discuss. It is running containers (ch-run
and the scripts that call it) that requires Linux system calls.
I see, I think however that this beyond my capabilities for now.
This will only work for those who have sudo on their mac, unfortunately.
@pagrubel You should be able to use ch-grow on mac. Though, I don't think that's been tested.
At the time of writing it looks like ./configure
on the master
branch will fail on mac OS because configure: error: shm_open(3) not found
. It looks like the configure script assumes that -lrt
is the linking source for shm_open
, but that is only true on Linux, and not BSD/Mac. spack
runs into the same issue rather than telling me that MacOS is not supported when I try to install charliecloud
package. Probably useful to raise an informative error in spack
recipe for now, when building on Mac.
If there are broader issues with performing basic builds on a Mac, I won't try to open a PR to fix that though.
@tylerjereddy The namespace system calls we need aren't available on Mac, so Charliecloud definitely can't run containers on a Mac. Building containers may be plausible. I'd certainly be open to a PR that fails configure
with a better error message on non-Linux systems, as well as the Spack recipe. A more extensive PR to enable building containers on a Mac would need more discussion, I think.
It turns out that we could build images on MacOS (via Docker but not ch-grow
because it needs ch-run
, which uses Linux system calls), and all/most of the shell scripts should work. So, we can revisit this.
The current plan is to add support for building images via docker and pushing images via ch-grow push
on MacOS. Will also require modifying configure.ac to support MacOS builds.
Hello, any update on this? is the suggested VM still the recommended route for creating a tarball from docker image on Mac? thanks!
@bio-la, thanks for asking. At present a Linux VM is the only way to do Charliecloud on MacOS. The Python and shell parts of Charliecloud should work on Macs, aside from there surely being showstopper bugs that need to be fixed, but we haven't been able to prioritize it. Patches welcome, of course.
Unable to build on mac laptop with OSX version 10.12.6:
Below is version information of my compiler:
Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/usr/include/c++/4.2.1 Apple LLVM version 9.0.0 (clang-900.0.37) Target: x86_64-apple-darwin16.7.0 Thread model: posix InstalledDir: /Library/Developer/CommandLineTools/usr/bin Here is the output from the make command: $ make printf '%s+%s%s\n' \ $(cat VERSION) \ $(git rev-parse --short HEAD) \ $(git diff-index --quiet HEAD || echo '.dirty') \