You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: pages/docs/install/install-mac.md
+34-9Lines changed: 34 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,22 +7,46 @@ folder: docs
7
7
8
8
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.
9
9
10
+
## Setup
11
+
12
+
First, install brew if you do not have it already.
13
+
10
14
```bash
11
-
# Install Brew if you do not have it installed already
# The next commands will install Vagrant and the necessary bits
18
+
Next, install Vagrant and the necessary bits.
19
+
20
+
```bash
15
21
brew cask install virtualbox
16
22
brew cask install vagrant
17
23
brew cask install vagrant-manager
24
+
```
18
25
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 <ahref="https://atlas.hashicorp.com/"target="_blank">Atlas</a>, one of <ahref="https://www.hashicorp.com/#open-source-tools"target="_blank">Hashicorp</a> many tools that likely you've used and haven't known it. The <ahref="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 <ahref="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
21
42
mkdir singularity-vm
22
43
cd singularity-vm
23
44
vagrant init bento/ubuntu-16.04
45
+
```
24
46
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
26
50
vagrant up --provider virtualbox
27
51
28
52
# Run the necessary commands within the VM to install Singularity
@@ -36,11 +60,12 @@ vagrant ssh -c /bin/sh <<EOF
36
60
make
37
61
sudo make install
38
62
EOF
63
+
```
39
64
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
43
68
vagrant ssh
44
69
```
45
70
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