Differences

This shows you the differences between two versions of the page.

Link to this comparison view

computing:singularity [2021/09/30 16:54]
ramesh
computing:singularity [2024/05/08 14:54] (current)
ramesh
Line 7: Line 7:
  
   * If you are in a hurry and have to use psrchive/dspsr, use a prebuilt Singularity container:   * If you are in a hurry and have to use psrchive/dspsr, use a prebuilt Singularity container:
-   ''singularity shell -B /fpra/timing/01 /homes/ramesh/dspsr_fits_mt.sif''+   ''singularity shell -B /fpra/timing/01 /homes/ramesh/dspsr_202111.sif''
   * In the above ''-B /fpra/timing/01'' is the directory that needs to visible inside singularity.   * In the above ''-B /fpra/timing/01'' is the directory that needs to visible inside singularity.
   * Access all other commands/utilities as you normally do:    * Access all other commands/utilities as you normally do: 
  
-   ramesh@dogmatix0 ~ $ singularity shell -B /fpra/timing/01 /homes/ramesh/dspsr_fits_mt.sif +   ramesh@dogmatix0 ~ $ singularity shell -B /fpra/timing/01 /homes/ramesh/dspsr_202111.sif 
    bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)    bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
-   Singularity dspsr_fits_mt.sif:~> pwd+   Singularity dspsr_202111.sif:~> pwd
    /homes/ramesh    /homes/ramesh
-   Singularity dspsr_fits_mt.sif:~> cd /fpra/timing/01/MAGNETARS/ +   Singularity dspsr_202111.sif:~> cd /fpra/timing/01/MAGNETARS/ 
-   Singularity dspsr_fits_mt.sif:/fpra/timing/01/MAGNETARS> cd J1818-1607/PSRIX0/20200314/search/ +   Singularity dspsr_202111.sif:/fpra/timing/01/MAGNETARS> cd J1818-1607/PSRIX0/20200314/search/ 
-   Singularity dspsr_fits_mt.sif:/fpra/timing/01/MAGNETARS/J1818-1607/PSRIX0/20200314/search> vap -c "freq bw" 2020-03-14-06:37:20.ar+   Singularity dspsr_202111.sif:/fpra/timing/01/MAGNETARS/J1818-1607/PSRIX0/20200314/search> vap -c "freq bw" 2020-03-14-06:37:20.ar
    filename   freq   bw    filename   freq   bw
    2020-03-14-06:37:20.ar   1358.926   -250.000    2020-03-14-06:37:20.ar   1358.926   -250.000
-   Singularity dspsr_fits_mt.sif:/fpra/timing/01/MAGNETARS/J1818-1607/PSRIX0/20200314/search>+   Singularity dspsr_202111.sif:/fpra/timing/01/MAGNETARS/J1818-1607/PSRIX0/20200314/search>
  
  
Line 28: Line 28:
  
   * Make sure that a prebuilt Docker container exists on Dockerhub    * Make sure that a prebuilt Docker container exists on Dockerhub 
-  * Build a singularity image by: '''singularity pull docker:/ /mpifrpsr/dspsr:fits_mt'''. +  * Build a singularity image by:  
-   (**NOTE**: no extra space between the forward slashes - unable to find the escape sequence in this Wiki). + 
-  * The above will create a singularity image ''dspsr_fits_mt.sif'' in the current directory.+    singularity build dspsr_202111.sif docker://bhcpsr/dspsr:202111 
 + 
 +  * The above will create a singularity image ''dspsr_202111.sif'' in the current directory
 +  * If the build above fails with ''no space left on device'' error, remove files that are like /var/tmp/docker-tar066320373.
  
  
Line 55: Line 58:
    paf0:~> singularity shell -e -B /media/titan0/ docker://bhcpsr/presto:r4.0    paf0:~> singularity shell -e -B /media/titan0/ docker://bhcpsr/presto:r4.0
        
-If you have troubles with getting your display, try setting the DISPLAY environment variable (as set before firing up the container) and copy $HOME/.Xauthority file to the home directory with Singularity container.+If you have trouble getting your display to work, try setting the DISPLAY environment variable (as set before firing up the container) and copy $HOME/.Xauthority file to the home directory within the Singularity container.  
 + 
 + 
 +====== Docker on Mac  ====== 
 + 
 +The recent Macs with the Apple M1/M2/M3 chips might have issues when the installed docker version is not updated. Check for new release here: https://docs.docker.com/desktop/release-notes/. On 08 May 2024, version 4.30.0 worked fine on Sonoma 14.4.1. 
 + 
 +Remove the old docker by navigating to Applications folder, and drag-n-drop docker app to the recycle bin.If there are issues in removing the docker app, stop any docker processes using  the activity monitor tool (found in the Utilities folder which is listed in Applications). 
 + 
 +Now when invoking docker from command line, make sure to use ''--platform linux/amd64'', as in the example below: 
 + 
 +  docker run -ti --rm --platform linux/amd64 -v /Users/rameshkaruppusamy/DOCK:/data --name="dspsr" --hostname="dspsr" bhcpsr/dspsr:202111.1 bash 
 +  root@dspsr:~# export DISPLAY=134.104.30.131:0 
 +  root@dspsr:~# pav -DFTp /data/2020-03-20-20\:18\:35.0024.p.calibP 
 + 
 +To get X11-forwarding to work properly, install xQuartz. Make sure that you enable "Allow connections from network clients" found under Security tab in xQuartz's settings. Make sure that you allow other clients to connect to xQuartz X11 server with ''xhost +'' on a terminal before invoking your container. The DISPLAY variable is set to the current IP of the Mac. Check this with ''ifconfig | grep inet'' on a terminal and choose the right IP address.
  
 +  
 
computing/singularity.1633013676.txt.gz ยท Last modified: 2021/09/30 16:54 by ramesh     Back to top