Skip to content

Commit e8fcd9e

Browse files
committed
adding Vagrant Virtualbox to install mac page
1 parent 5af531c commit e8fcd9e

File tree

1 file changed

+34
-9
lines changed

1 file changed

+34
-9
lines changed

pages/docs/install/install-mac.md

Lines changed: 34 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,22 +7,46 @@ folder: docs
77

88
This recipe demonstrates how to run Singularity on your Mac via Vagrant and Ubuntu. The recipe requires access to `brew` which is a package installation subsystem for OS X. This recipe may take anywhere from 5-20 minutes to complete.
99

10+
## Setup
11+
12+
First, install brew if you do not have it already.
13+
1014
```bash
11-
# Install Brew if you do not have it installed already
1215
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
16+
```
1317

14-
# The next commands will install Vagrant and the necessary bits
18+
Next, install Vagrant and the necessary bits.
19+
20+
```bash
1521
brew cask install virtualbox
1622
brew cask install vagrant
1723
brew cask install vagrant-manager
24+
```
1825

19-
# Create a working directory for the Vagrant configuration and
20-
# generate a template Vagrantfile for "bento/ubuntu-16.04"
26+
## Option 1: Singularityware Vagrant Box
27+
28+
We are maintaining a set of Vagrant Boxes via <a href="https://atlas.hashicorp.com/" target="_blank">Atlas</a>, one of <a href="https://www.hashicorp.com/#open-source-tools" target="_blank">Hashicorp</a> many tools that likely you've used and haven't known it. The <a href="https://atlas.hashicorp.com/singularityware/boxes/singularity-2.2.99" target="_blank">Singularity Box</a> is for version 2.2.99, and will be updated appropriately with the release of 2.3. To use this box, you can simply create a folder, and then do the following:
29+
30+
```bash
31+
mkdir singularity-vm
32+
cd singularity-vm
33+
vagrant init singularityware/singularity-2.2.99
34+
vagrant ssh
35+
```
36+
37+
## Option 2: Vagrant Box from Scratch
38+
39+
If you want to use a different version of Singularity, or want to get more familiar with how Vagrant and VirtualBox work, you can build your own Vagrant Box from scratch. In this case, we will use the Vagrantfile for `bento/ubuntu-16.04`, however you could also try any of the <a href="https://atlas.hashicorp.com/bento" target="_blank">other bento boxes</a> that are equally delicious. As before, you should first make a separate directory for your Vagrantfile, and then init a base image.
40+
41+
```bash
2142
mkdir singularity-vm
2243
cd singularity-vm
2344
vagrant init bento/ubuntu-16.04
45+
```
2446

25-
# Build and start the Vagrant hosted VM
47+
Next, build and start the vagrant hosted VM, and you will install Singularity by sending the entire install script as a command (with the `-c` argument). You could just as easily shell into the box first with vagrant ssh, and then run these commands on your own. To each bento, his own.
48+
49+
```bash
2650
vagrant up --provider virtualbox
2751

2852
# Run the necessary commands within the VM to install Singularity
@@ -36,11 +60,12 @@ vagrant ssh -c /bin/sh <<EOF
3660
make
3761
sudo make install
3862
EOF
63+
```
3964

40-
# Singularity is installed in your Vagrant Ubuntu VM! Now you can
41-
# use Singularity as you would normally by logging into the VM
42-
# directly
65+
At this point, Singularity is installed in your Vagrant Ubuntu VM! Now you can use Singularity as you would normally by logging into the VM directly
66+
67+
```bash
4368
vagrant ssh
4469
```
4570

46-
Remember that the VM is running in the background because we started it via the command `vagrant up`. You can shut the VM down using the command 'vagrant halt' when you no longer need it.
71+
Remember that the VM is running in the background because we started it via the command `vagrant up`. You can shut the VM down using the command `vagrant halt` when you no longer need it.

0 commit comments

Comments
 (0)