Difference between revisions of "Note about container"

From Hall A Wiki
Jump to: navigation, search
(singularity)
Line 6: Line 6:
  
 
* warning
 
* warning
** if you are running singularity-2.4 on a centos7.2 host, you could have kernel panic if you use ROOT TMD5 and load your host dir  
+
** if you are running singularity-2.4.x on a centos7.2 host, you could have kernel panic if you use ROOT TMD5 and load your host dir  
  
 
* installation
 
* installation
 
** refer to [http://singularity.lbl.gov/install-linux installation instruction] and the latest version is recommend.
 
** refer to [http://singularity.lbl.gov/install-linux installation instruction] and the latest version is recommend.
** singularity-2.4 can run singularity-2.3 images and has many new features and we should use it instead of 2.3 whenever possible
+
** singularity-2.4.x can run singularity-2.3.x images and has many new features and we should use it instead of 2.3.x whenever possible
 
** On redhat-kind linux, build an rpm first and install it. at least "squashfs-tools,automake,rpm-build,libtool" are needed to build it.
 
** On redhat-kind linux, build an rpm first and install it. at least "squashfs-tools,automake,rpm-build,libtool" are needed to build it.
** On windows and Mac, the official way just running a small linux virtual machine with virtualbox, but the virtual box is not good for graphic application. The better alternative is to use a good but not so small linux virtual machine. If you have one already, use it. If not, see below to download an existing one.
+
** On windows and Mac, the official way just running a small linux virtual machine with virtualbox, but the virtual machine is not good for graphic application. The better alternative is to use a good but not so small linux virtual machine. If you have one already, use it. If not, see below to download an existing one.
  
* a centos virtualbox virtual machine to run singularity and docker
+
* singularity at jlab as 2018/03/06
** download and install virtualbox https://www.virtualbox.org/wiki/Downloads
+
** jlab farm and ifarm has singularity-2.3.1 installed as default, it's too old, don't use it.
** It's nice, but not a must, to run singularity image in shared folder because it keeps the virtual machine size small. Vmware's shared folder doesn't work for this, but virtualbox does
+
** other version is installed by "module", check what's available at /usr/local/singularity/ and load by "module load singularity-2.4.2" to use it, or stop using it by "module rm singularity-2.4.2"
** download the machine at http://www.phy.duke.edu/~zz81/package/CentOS7_x86_64_20171030.ova (a centos7.4 with latest update on 20171030 and singularity-2.4.2 and latest docker installed)
+
** import the virtual machine into virtualbox refer to [https://askubuntu.com/questions/588426/how-to-export-and-import-virtualbox-vm-images
+
** set up a shared folder with name "share" in the machine setting and put the singularity image into the shared folder on host
+
** boot up the linux virtual machine and login with both "root" and user "user" password are "111111"
+
** mount the shared folder "sudo mount -t vboxsf -o uid=$uid,gid=$gid share share" and use /home/user/share" as your working dir, then you can test singularity
+
** use the installed singularity and docker, or update docker by yum or singularity by compile from source if you want
+
 
+
* singularity at jlab as 2018/02/28
+
** jlab farm and ifarm has singularity-2.3.1 installed as default
+
** on ifarm1402, you can also test singularity-2.4.2 and singularity-2.3.2 by using module with "module load singularity-2.4.2" or "module load singularity-2.3.2" and "module rm singularity-2.4.2" or "module rm singularity-2.3.2". They are not on farm nodes, so we can't run jobs yet
+
  
 
* test singularity  
 
* test singularity  
Line 51: Line 41:
 
*** images as one file at "C:\Users\Public\Documents\Hyper-V\Virtual hard disks\"
 
*** images as one file at "C:\Users\Public\Documents\Hyper-V\Virtual hard disks\"
 
** release space by https://stackoverflow.com/questions/44288901/how-to-force-docker-to-release-storage-space-after-manual-delete-of-file-in-volu
 
** release space by https://stackoverflow.com/questions/44288901/how-to-force-docker-to-release-storage-space-after-manual-delete-of-file-in-volu
 +
 +
= a good linux virtual machine to run singularity and docker =
 +
* a good linux virtual machine to run singularity and docker, centos7 made with virtualbox
 +
** download and install virtualbox https://www.virtualbox.org/wiki/Downloads
 +
** It's nice, but not a must, to run singularity image in shared folder because it keeps the virtual machine size small. Vmware's shared folder doesn't work for this, but virtualbox does
 +
** download the machine at http://webhome.phy.duke.edu/~zz81/package/CentOS7_20180303.ova (a centos7 64bit with latest update on 20180303 and singularity-2.4.2 and latest docker installed)
 +
** import the virtual machine into virtualbox refer to [https://askubuntu.com/questions/588426/how-to-export-and-import-virtualbox-vm-images
 +
** boot up the linux virtual machine and login with user name "user" without password, just you know root password is "111111"
 +
** use the installed singularity and docker, or update docker by yum or singularity by compile from source if you want
 +
** set up a shared folder with name "share" in the machine setting and put any singularity images into the shared folder on host
 +
** mount the shared folder "sudo mount -t vboxsf -o uid=$uid,gid=$gid share share" and use /home/user/share" as your working dir
  
 
= log =
 
= log =
 
questions and comments should go to Zhiwen Zhao zwzhao at jlab.org
 
questions and comments should go to Zhiwen Zhao zwzhao at jlab.org

Revision as of 19:12, 7 March 2018

singularity

  • warning
    • if you are running singularity-2.4.x on a centos7.2 host, you could have kernel panic if you use ROOT TMD5 and load your host dir
  • installation
    • refer to installation instruction and the latest version is recommend.
    • singularity-2.4.x can run singularity-2.3.x images and has many new features and we should use it instead of 2.3.x whenever possible
    • On redhat-kind linux, build an rpm first and install it. at least "squashfs-tools,automake,rpm-build,libtool" are needed to build it.
    • On windows and Mac, the official way just running a small linux virtual machine with virtualbox, but the virtual machine is not good for graphic application. The better alternative is to use a good but not so small linux virtual machine. If you have one already, use it. If not, see below to download an existing one.
  • singularity at jlab as 2018/03/06
    • jlab farm and ifarm has singularity-2.3.1 installed as default, it's too old, don't use it.
    • other version is installed by "module", check what's available at /usr/local/singularity/ and load by "module load singularity-2.4.2" to use it, or stop using it by "module rm singularity-2.4.2"
  • test singularity
    • cd some_where_with_enough_space
    • "setenv http_proxy http://jprox.jlab.org:8082" "setenv https_proxy http://jprox.jlab.org:8082" if you are on jlab ifarm
    • setenv SINGULARITY_CACHEDIR ./ (change cache dir from default ~/.singularity, MUST do at jlab ifarm with very limited space at hom)
    • singularity pull docker://godlovedc/lolcow
    • singularity run lolcow.img
    • setenv PYTHONHTTPSVERIFY 0 (sometime needed to bypass singularity hub certificate check)
    • singularity pull shub://GodloveD/lolcow
    • singularity run GodloveD-lolcow-master-latest.simg

docker

a good linux virtual machine to run singularity and docker

  • a good linux virtual machine to run singularity and docker, centos7 made with virtualbox
    • download and install virtualbox https://www.virtualbox.org/wiki/Downloads
    • It's nice, but not a must, to run singularity image in shared folder because it keeps the virtual machine size small. Vmware's shared folder doesn't work for this, but virtualbox does
    • download the machine at http://webhome.phy.duke.edu/~zz81/package/CentOS7_20180303.ova (a centos7 64bit with latest update on 20180303 and singularity-2.4.2 and latest docker installed)
    • import the virtual machine into virtualbox refer to [https://askubuntu.com/questions/588426/how-to-export-and-import-virtualbox-vm-images
    • boot up the linux virtual machine and login with user name "user" without password, just you know root password is "111111"
    • use the installed singularity and docker, or update docker by yum or singularity by compile from source if you want
    • set up a shared folder with name "share" in the machine setting and put any singularity images into the shared folder on host
    • mount the shared folder "sudo mount -t vboxsf -o uid=$uid,gid=$gid share share" and use /home/user/share" as your working dir

log

questions and comments should go to Zhiwen Zhao zwzhao at jlab.org