Difference between revisions of "Talk:SW:Singularity"
(→nearing in on objective) |
(→nearing in on objective) |
||
Line 45: | Line 45: | ||
The objective in this case is a Fedora28-HPRCLAB.img file that has space for users to manuever around and install stuff: | The objective in this case is a Fedora28-HPRCLAB.img file that has space for users to manuever around and install stuff: | ||
− | # that we can provide to users, a Singularity .img file (self-contained), for them to update as needed (as root on their own workstations) that also runs on our clusters | + | # that we can provide to users, a Singularity .img file (self-contained), for them to update as needed (as root on their own workstations) that also runs on our clusters. |
# is already populated with HPRCLAB RPMs | # is already populated with HPRCLAB RPMs | ||
# has plenty of disk space for the user to add files (as non-root) while on the cluster | # has plenty of disk space for the user to add files (as non-root) while on the cluster | ||
+ | # Example below was created on HPRCLAB workstations. | ||
Latest go around looks like this: | Latest go around looks like this: | ||
* create a (--writeable) Singularity sandbox from docker://fedora:28 (called mysandbox below... a directory) | * create a (--writeable) Singularity sandbox from docker://fedora:28 (called mysandbox below... a directory) | ||
− | <pre>singularity build --sandbox | + | |
+ | <pre> | ||
+ | sudo singularity build --sandbox Fedora28-HPRCLAB.sandbox docker://fedora:28 | ||
+ | </pre> | ||
+ | |||
* run 'sudo singularity shell" on sandbox to populate (JKP: need to check if sudo is necessary here) | * run 'sudo singularity shell" on sandbox to populate (JKP: need to check if sudo is necessary here) | ||
* populate the sandbox with all the RPMs (probably requires sudo above) and users (again sudo) | * populate the sandbox with all the RPMs (probably requires sudo above) and users (again sudo) |
Revision as of 06:29, 11 August 2018
Contents
j-perdue random links for 8/10/2018
Placeholder
To be added to SW:Singlularity:Examples or something.... just a placeholder for now to dump all my URLs at home for access at work:
https://github.com/singularityware/singularity/issues/1076
https://github.com/singularityware/singularity/issues/1165
http://singularity.lbl.gov/quickstart#build-images-from-scratch
https://hub.docker.com/_/fedora/
https://github.com/NIH-HPC/singularity-examples/blob/master/torch/Singularity.torch
history
- random notes from .bash_history on hprclab2
[j-perdue@hprclab2 ~]$ history | grep docker 460 git clone https://github.com/fedora-cloud/docker-brew-fedora.git 466 less prep-docker-brew-branch.sh 468 ./prep-docker-brew-branch.sh 28 470 sudo docker pull fedora:28 472 sudo docker run --rm -ti fedora:28 bash 484 sudo docker run -ti fedora:28 bash 494 sudo docker run -ti fedora:28 bash 495 man docker 496 man docker-run 497 sudo docker build --writable Fedora28.img fedora:28 515 sudo singularity build --writable FedoraLatest.img docker://fedora:latest 516 sudo singularity build --writable Fedora28.img docker://fedora:28 523 # sudo singularity build --writable --size Fedora28.img docker://fedora:28 541 history | grep docker [j-perdue@hprclab2 ~]$ history | grep singularit 510 sudo singularity build --writable Fedora28.img fedora:28 511 sudo singularity build --writable Fedora28.img fedora:27 512 sudo singularity build --writable Fedora28.img XXX sudo singularity shell --writable Fedora28-HPRCLAB.img
nearing in on objective
The objective in this case is a Fedora28-HPRCLAB.img file that has space for users to manuever around and install stuff:
- that we can provide to users, a Singularity .img file (self-contained), for them to update as needed (as root on their own workstations) that also runs on our clusters.
- is already populated with HPRCLAB RPMs
- has plenty of disk space for the user to add files (as non-root) while on the cluster
- Example below was created on HPRCLAB workstations.
Latest go around looks like this:
- create a (--writeable) Singularity sandbox from docker://fedora:28 (called mysandbox below... a directory)
sudo singularity build --sandbox Fedora28-HPRCLAB.sandbox docker://fedora:28
- run 'sudo singularity shell" on sandbox to populate (JKP: need to check if sudo is necessary here)
- populate the sandbox with all the RPMs (probably requires sudo above) and users (again sudo)
- once you are happy with that, time to make an .img
- singularity image.create my20Gimage.img # create .img file
- singularity image.expand -s 20480 my20Gimage.img # expand to 20GB (works because there is no real file system yet)
- sudo tar -cvf - -C mysandbox/ . | sudo singularity image.import my20Gimage.img # see the last/tar example in 'singularity image.import --help'