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

Provide nmag in container #6

Closed
fangohr opened this issue Dec 6, 2019 · 6 comments
Closed

Provide nmag in container #6

fangohr opened this issue Dec 6, 2019 · 6 comments
Assignees

Comments

@fangohr
Copy link
Member

fangohr commented Dec 6, 2019

It would be beautiful to provide Nmag in a container (such as Docker or Singularity). Once done,
installation and use of Nmag is simplified as only the container is needed to be downloaded. Further compilation would not be necessary.

Instead of calling "nsim script.py" one would do something like "docker run nsim script.py" and mount the local directory into the container. (see [1] for basic introduction).

I have tried to compile Nmag in a Docker container but didn't succeed (and then ran out of time); see https://github.com/fangohr/nmag-containers

[1] https://github.com/fangohr/containers-for-science

@fangohr
Copy link
Member Author

fangohr commented Dec 25, 2019

A good step forward has been made in nmag-project/containers#2 - this provides a singularity container in which nsim can be executed.

@mhanberry1 mhanberry1 self-assigned this Dec 29, 2019
@mhanberry1
Copy link
Member

The singularity image is hosted in the syslabs.io cloud library now:
https://cloud.sylabs.io/library/mhanberry1/default/nmag

@fangohr
I think this issue can be closed now since there is a separate issue open for continuous integration (#7). Please verify.

@Venkat004
Copy link
Collaborator

Nmag at syslabs.io cloud is verified and working fine with the test run as shown below with screen shot.

image

image

SUDO is not needed here as you can see the command used is the following in the above screen shot.

$ singularity exec nmag_0.2.1.sif nsim sphere1.py

@fangohr
Copy link
Member Author

fangohr commented Dec 30, 2019

Regarding HLIB: is it still the case that one needs to request a license to use it? In that case, we cannot include it in the container. We could ask the owners if they care about the old version we presumably need, or wether it would be okay to include that, but we would need permission. (Maybe distributing the binary would be okay? Needs checking, and probably a new issue.)

@Venkat004
Copy link
Collaborator

Do we need to implement the hlib package before making the container image file (.sif). Otherwise, it will be limited to non-hlib simulations. The users themselves can not keep the hlib library within sif file at later stage.

We can make a note for such requirements, users can add the hlib package into the respective path soon after unzipping the source tar file, before building the nmag-sandbox.

Another option would be get the permission from Hlib authors http://hlib.org/license.html, for deployment purpose in the form of .sif (end binary file) only but neither at sandbox nor at source tar file levels.

@fangohr
Copy link
Member Author

fangohr commented Dec 30, 2019

Regarding closing this issue: We should have continuous integration somewhere that runs all tests whenever (if?) we change the nmag / nsim source code. My initial thinking was that this should be associated to a different repo (maybe nmag-src).

Here, I was thinking that we should have a simplified version of testing: once the container is built, it would be nice to run a one simple example through the container - just to demo that this is basically okay.

Now, I don't know if we get nmag compiled in the nmag-src continuous integration without singularity. If we need singularity, then the question if we should build it in the nmag-src continuous integration, and not do it in the nmag-containers repo. But for now, my recommendation would be to extend nmag-containers to

  • build the container as part of CI
  • run 'nsim_version_info' or whatever the name is to document the version in the output of the CI
  • run 'nsim sphere1.py' or similar to check that this works (and gcc is accessible etc)

We would then either later merge this with the CI for nmag-src, or keep both CIs going.

@mhanberry1 - what do you think?

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

No branches or pull requests

3 participants