Installing Singularity on MacOS

2,225 views
Skip to first unread message

Tashalee Billings

unread,
Jun 6, 2019, 11:38:36 AM6/6/19
to singularity
Hi,

I am interested in trying to run CASA tasks/tools in jupyter notebook and it seems as though in order to do so I need to be able to use the container "Singularity". I tried logging into some virtual machine and use some software handler "vagrant" to install the container. I'm having some trouble with that too. So then I decided to try and install the container on my machine, which is a MacbookPro, by copying over the github repository and executing the shell scripts but there seems to be no shell scripts for me to execute. There is no "autogen.sh" so I can't configure anything.

$ git clone https://github.com/singularityware/singularity.git

cd singularity

./autogen.sh

./configure --prefix=/usr/local

make


Thank you for your help,

Tasha

v

unread,
Jun 6, 2019, 11:53:57 AM6/6/19
to singu...@lbl.gov
Hey Tasha,

I think you are looking at old installation instructions for Singularity - there hasn't been an autogen.sh in a while! The version 3 (and beyond) libraries are in GoLang, and there are special instructions for Mac/Windows to install. I think you find most of what you are looking for here: https://www.sylabs.io/guides/3.2/user-guide/installation.html?highlight=mac#install-on-windows-or-mac and feel free to ping the wisdom of the list if you run into trouble.

Best,

Vanessa

--
You received this message because you are subscribed to the Google Groups "singularity" group.
To unsubscribe from this group and stop receiving emails from it, send an email to singularity...@lbl.gov.
To view this discussion on the web visit https://groups.google.com/a/lbl.gov/d/msgid/singularity/aa1edf11-95ff-4384-a83e-631b2cfa299a%40lbl.gov.


--
Vanessa Villamia Sochat
Stanford University '16

John Hearns

unread,
Jun 6, 2019, 12:25:44 PM6/6/19
to singu...@lbl.gov
Hello Tasha. I know a bit about Vagrant, and am happy to help with that side of things.

I know how you feel - starting out with what seems like a simple desire to run some software ends up with you becoming an expert in software libraries, Singularity etc.
Well I have been doing that for more than 30 years!

My advice - take up lion taming. If the lions are afraid of you, you have a career. When you get afraid of the lions.... Arggggh! Crunch! Roar!
It is the same with software - don't let it get the upper hand.






Glenn (Gedaliah) Wolosh

unread,
Jun 6, 2019, 12:28:10 PM6/6/19
to singu...@lbl.gov

On Jun 6, 2019, at 12:25 PM, 'John Hearns' via singularity <singu...@lbl.gov> wrote:

Hello Tasha. I know a bit about Vagrant, and am happy to help with that side of things.

I know how you feel - starting out with what seems like a simple desire to run some software ends up with you becoming an expert in software libraries, Singularity etc.
Well I have been doing that for more than 30 years!

My advice - take up lion taming. If the lions are afraid of you, you have a career. When you get afraid of the lions.... Arggggh! Crunch! Roar!
It is the same with software - don't let it get the upper hand.



I love this. I’m gonna steal it

—Gedaliah

John Hearns

unread,
Jun 6, 2019, 12:44:57 PM6/6/19
to singu...@lbl.gov
I have pulled the Singularity image for CASA and have got it running. That is on Linux sadly - I have access to a huge number of Linux boxes!
One tip though which I forgot - to get a Jupyter notebook to do anything press SHIFT-ENTER


Stephen Hauskins

unread,
Jun 6, 2019, 12:49:57 PM6/6/19
to singu...@lbl.gov

--
You received this message because you are subscribed to the Google Groups "singularity" group.
To unsubscribe from this group and stop receiving emails from it, send an email to singularity...@lbl.gov.
To view this discussion on the web visit https://groups.google.com/a/lbl.gov/d/msgid/singularity/aa1edf11-95ff-4384-a83e-631b2cfa299a%40lbl.gov.


--

Tashalee Billings

unread,
Jun 6, 2019, 12:56:35 PM6/6/19
to singularity
Hi Vanessa,

Oh ok. I figured I must have been on the wrong website. Thank you so much for responding. So I've actually gone through all of this using http://singularity.lbl.gov/install-mac#option-1-singularityware-vagrant-box so this is good new. I thought there was another way but it seems like I did it. I just didn't make a new directory vm-singularity but that shouldn't change anything. I'm able to log into the vm.

vagrant@vagrant:~$ singularity version

3.2.1-1


Now I'm trying to use singularity to run a CASA session in jupyter notebook. https://github.com/aardk/jupyter-casa. I followed his instruction for using singularity, look below

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Installation

Because Jupyter requires a much more current python distribution than what is provided in NRAO's CASA releases, a custom build of CASA is required. We distribute a DOCKER image containing a version of CASA which uses the most recent (I)python, matplotlib, etc. Note that this version of CASA can only be used from within Jupyter.

Installation is as simple as executing: docker pull penngwyn/jupytercasa

Alternatively there is also a SINGULARITY image which may be a bit easier to use, it can be downloaded by executing:

singularity pull --name jupyter-casa.simg shub://aardk/jupyter-casa:docker

Usage

Singularity

The simplest way to start the Jupyter server is to execute:

singularity run jupyter-casa.simg

Unlike DOCKER, a SINGULARITY containter runs with UID of the current user (i.e. the user executing singularity run). The home directory of the user on the local filesystem will also be accessible inside the container, but by default only the home directory is shared with the container. Therefore any symbolic links which point to locations outside of the home directory will not be valid inside the container.

Fortunately, it is fairly straigthforward to make your local filesystem accessible to the container using the -B option. For example to mount a directory called /data inside the container execute:

singularity run -B /data:$HOME/data jupyter-casa.simg

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

But the issue is that I can't even get the notebook to open (the site cannot be reached) and if it does there is no CASA session.

vagrant@vagrant:~$ singularity pull --name jupyter-casa.simg shub://aardk/jupyter-casa:docker

 1.17 GiB / 1.17 GiB [=================================] 100.00% 22.19 MiB/s 53s

vagrant@vagrant:~$ ls

jupyter-casa.simg

vagrant@vagrant:~$ singularity run jupyter-casa.simg

Starting Jupyter

[I 16:53:49.621 NotebookApp] Writing notebook server cookie secret to /home/vagrant/.local/share/jupyter/runtime/notebook_cookie_secret

[I 16:53:49.865 NotebookApp] Serving notebooks from local directory: /home/vagrant

[I 16:53:49.865 NotebookApp] The Jupyter Notebook is running at:

[I 16:53:49.865 NotebookApp] http://localhost:8888/?token=f8274011440824c291d2dbd1001cab4703c4374aa5452a4d

[I 16:53:49.866 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).

[W 16:53:49.869 NotebookApp] No web browser found: could not locate runnable browser.

[C 16:53:49.870 NotebookApp] 

    

    To access the notebook, open this file in a browser:

        file:///home/vagrant/.local/share/jupyter/runtime/nbserver-1118-open.html

    Or copy and paste one of these URLs:

        http://localhost:8888/?token=f8274011440824c291d2dbd1001cab4703c4374aa5452a4d


This may be outside the scope of this group but any help is appreciated. I did contact the owner of the github account and because of the huge time difference, our conversation is slow.

Thank you,

Tasha


On Thursday, June 6, 2019 at 9:53:57 AM UTC-6, vanessa wrote:
Hey Tasha,

I think you are looking at old installation instructions for Singularity - there hasn't been an autogen.sh in a while! The version 3 (and beyond) libraries are in GoLang, and there are special instructions for Mac/Windows to install. I think you find most of what you are looking for here: https://www.sylabs.io/guides/3.2/user-guide/installation.html?highlight=mac#install-on-windows-or-mac and feel free to ping the wisdom of the list if you run into trouble.

Best,

Vanessa

On Thu, Jun 6, 2019 at 11:39 AM 'Tashalee Billings' via singularity <singu...@lbl.gov> wrote:
Hi,

I am interested in trying to run CASA tasks/tools in jupyter notebook and it seems as though in order to do so I need to be able to use the container "Singularity". I tried logging into some virtual machine and use some software handler "vagrant" to install the container. I'm having some trouble with that too. So then I decided to try and install the container on my machine, which is a MacbookPro, by copying over the github repository and executing the shell scripts but there seems to be no shell scripts for me to execute. There is no "autogen.sh" so I can't configure anything.

$ git clone https://github.com/singularityware/singularity.git

cd singularity

./autogen.sh

./configure --prefix=/usr/local

make


Thank you for your help,

Tasha

--
You received this message because you are subscribed to the Google Groups "singularity" group.
To unsubscribe from this group and stop receiving emails from it, send an email to singu...@lbl.gov.

Tashalee Billings

unread,
Jun 6, 2019, 12:57:42 PM6/6/19
to singularity
YEs! So this is the one I used initially.


On Thursday, June 6, 2019 at 10:49:57 AM UTC-6, Stephen Hauskins wrote:
On Thu, Jun 6, 2019 at 8:40 AM 'Tashalee Billings' via singularity <singu...@lbl.gov> wrote:
Hi,

I am interested in trying to run CASA tasks/tools in jupyter notebook and it seems as though in order to do so I need to be able to use the container "Singularity". I tried logging into some virtual machine and use some software handler "vagrant" to install the container. I'm having some trouble with that too. So then I decided to try and install the container on my machine, which is a MacbookPro, by copying over the github repository and executing the shell scripts but there seems to be no shell scripts for me to execute. There is no "autogen.sh" so I can't configure anything.

$ git clone https://github.com/singularityware/singularity.git

cd singularity

./autogen.sh

./configure --prefix=/usr/local

make


Thank you for your help,

Tasha

--
You received this message because you are subscribed to the Google Groups "singularity" group.
To unsubscribe from this group and stop receiving emails from it, send an email to singu...@lbl.gov.

v

unread,
Jun 6, 2019, 1:03:44 PM6/6/19
to singu...@lbl.gov
Hey Tasha,

Notebooks usually open in a browser on your computer (chrome, firefox) so you would want to try installing on on the VM I think. You'll then likely run into issues of connecting to the VM - you'd probably want to specify the hostname to be 0.0.0.0 and then use the address of the VM from your machine. Check out this article for some steps to help!

Best,

Vanessa

To unsubscribe from this group and stop receiving emails from it, send an email to singularity...@lbl.gov.
To view this discussion on the web visit https://groups.google.com/a/lbl.gov/d/msgid/singularity/89785fec-ed8e-493c-8ca0-be84870b7682%40lbl.gov.

Tashalee Billings

unread,
Jun 6, 2019, 1:05:46 PM6/6/19
to singularity
Hi John,

I think this is possibly where the issue is for me. Although it seems as though I can log into the vm I cannot seem to get the notebook open with a CASA session. Here is the weird thing that happens. If I have another notebook on my local machine open and running and then I try to open a notebook in the vm it WILL open when I copy and paste the link but I don't have the option to start a new CASA session. See the attached image. However, if I close the jupyter session on my machine and try to open a notebook in the vm it WILL NOT open. It simply says site cannot be reached.

I tried to follow the instruction on https://github.com/aardk/jupyter-casa, look below.
To unsubscribe from this group and stop receiving emails from it, send an email to singu...@lbl.gov.


--
Vanessa Villamia Sochat
Stanford University '16

--
You received this message because you are subscribed to the Google Groups "singularity" group.
To unsubscribe from this group and stop receiving emails from it, send an email to singu...@lbl.gov.

--
You received this message because you are subscribed to the Google Groups "singularity" group.
To unsubscribe from this group and stop receiving emails from it, send an email to singu...@lbl.gov.

--
You received this message because you are subscribed to the Google Groups "singularity" group.
To unsubscribe from this group and stop receiving emails from it, send an email to singu...@lbl.gov.
Screen Shot 2019-06-06 at 11.01.58 AM.png

Tashalee Billings

unread,
Jun 6, 2019, 1:06:16 PM6/6/19
to singularity
Thank you so much for responding!


On Thursday, June 6, 2019 at 10:25:44 AM UTC-6, John Hearns wrote:
Hello Tasha. I know a bit about Vagrant, and am happy to help with that side of things.

I know how you feel - starting out with what seems like a simple desire to run some software ends up with you becoming an expert in software libraries, Singularity etc.
Well I have been doing that for more than 30 years!

My advice - take up lion taming. If the lions are afraid of you, you have a career. When you get afraid of the lions.... Arggggh! Crunch! Roar!
It is the same with software - don't let it get the upper hand.






On Thu, 6 Jun 2019 at 16:55, v <vso...@gmail.com> wrote:
Hey Tasha,

I think you are looking at old installation instructions for Singularity - there hasn't been an autogen.sh in a while! The version 3 (and beyond) libraries are in GoLang, and there are special instructions for Mac/Windows to install. I think you find most of what you are looking for here: https://www.sylabs.io/guides/3.2/user-guide/installation.html?highlight=mac#install-on-windows-or-mac and feel free to ping the wisdom of the list if you run into trouble.

Best,

Vanessa

On Thu, Jun 6, 2019 at 11:39 AM 'Tashalee Billings' via singularity <singu...@lbl.gov> wrote:
Hi,

I am interested in trying to run CASA tasks/tools in jupyter notebook and it seems as though in order to do so I need to be able to use the container "Singularity". I tried logging into some virtual machine and use some software handler "vagrant" to install the container. I'm having some trouble with that too. So then I decided to try and install the container on my machine, which is a MacbookPro, by copying over the github repository and executing the shell scripts but there seems to be no shell scripts for me to execute. There is no "autogen.sh" so I can't configure anything.

$ git clone https://github.com/singularityware/singularity.git

cd singularity

./autogen.sh

./configure --prefix=/usr/local

make


Thank you for your help,

Tasha

--
You received this message because you are subscribed to the Google Groups "singularity" group.
To unsubscribe from this group and stop receiving emails from it, send an email to singu...@lbl.gov.


--
Vanessa Villamia Sochat
Stanford University '16

--
You received this message because you are subscribed to the Google Groups "singularity" group.
To unsubscribe from this group and stop receiving emails from it, send an email to singu...@lbl.gov.

Tashalee Billings

unread,
Jun 6, 2019, 7:13:58 PM6/6/19
to singularity
Hi Vanessa,

Ok great yes I was able to do that now thank you so much for your help!

Tasha

v

unread,
Jun 6, 2019, 7:17:01 PM6/6/19
to singu...@lbl.gov
Any time! Happy jupyter-containering! :)

To unsubscribe from this group and stop receiving emails from it, send an email to singularity...@lbl.gov.
To view this discussion on the web visit https://groups.google.com/a/lbl.gov/d/msgid/singularity/75437d80-4f1e-48d4-b964-5d478eb81cf8%40lbl.gov.
Reply all
Reply to author
Forward
0 new messages