Switch to unified view

a b/docs/getting_started/vagrant.md
1
# Running HippUnfold with a Vagrant VM
2
3
This option uses Vagrant to create a virtual machine that has Linux
4
and Singularity installed. This allows you to use Singularity to run HippUnfold 
5
from a clean environment, whether you are running Linux, Mac or Windows (since all
6
three are supported by Vagrant). Note: VirtualBox does the actual 
7
virtualization in this example, but Vagrant provides an easy and reproducible way to create and 
8
connect to the VMs (as shown below).
9
10
11
## Install VirtualBox and Vagrant
12
13
The example below uses Vagrant and VirtualBox installed on Ubuntu 20.04. 
14
15
The [Vagrant install instructions](https://developer.hashicorp.com/vagrant/downloads) describe
16
what you need to do to install on Mac, Windows or Linux.
17
18
Vagrant must use a **provider** for the actual virtualization. The instructions here assume you
19
are using VirtualBox for this, since it is free and easy to use, but in principle should work with any
20
virtualization provider.  The [VirtualBox downloads page](https://www.virtualbox.org/wiki/Downloads) 
21
can guide you through the process of installing it on your system (Mac, Windows, Linux supported).
22
23
24
## Create a Vagrant Box 
25
26
Once you have Vagrant and VirtualBox installed, the following screencast demonstrates 
27
how you can setup a Box with Singularity pre-loaded on it. The main steps are to 1) create a Vagrantfile, 2) start the box using `vagrant up`, and 3) connect to it using `vagrant ssh`.
28
29
Note: These screencasts are more than just videos, they are asciinema recordings -- you can pause them and then copy-paste text
30
directly from the asciinema cast!
31
32
```{asciinema} ../casts/vagrant_hippunfold_setup.cast
33
---
34
preload: 1
35
speed: 2
36
---
37
```
38
39
This is the `Vagrantfile` used in the video, for quick reference:
40
```
41
Vagrant.configure("2") do |config|
42
  config.vm.box = "sylabs/singularity-3.7-ubuntu-bionic64"
43
  config.vm.provider "virtualbox" do |vb|
44
     vb.cpus = 8
45
     vb.memory = "8096"
46
   end
47
end
48
```
49
50
51
## Download the test dataset
52
53
We are downloading the test dataset with the following 
54
command:
55
```
56
wget https://www.dropbox.com/s/mdbmpmmq6fi8sk0/hippunfold_test_data.tar
57
```
58
59
60
```{asciinema} ../casts/vagrant_hippunfold_get_data.cast
61
---
62
preload: 1
63
speed: 2
64
---
65
```
66
67
68
## Download the HippUnfold container
69
70
We pull/build the container from DockerHub:
71
```
72
singularity pull docker://khanlab/hippunfold:latest
73
```
74
75
## Run HippUnfold
76
This demonstrates the basic HippUnfold options, and how
77
to perform a dry-run:
78
79
```{asciinema} ../casts/vagrant_hippunfold_dryrun.cast
80
---
81
preload: 1
82
speed: 2
83
---
84
```
85
86
Finally, we can run HippUnfold using all the cores:
87
88
```{asciinema} ../casts/vagrant_hippunfold_run.cast
89
---
90
preload: 1
91
speed: 2
92
---
93
```
94
95