-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild_walk_through.txt
55 lines (38 loc) · 1.75 KB
/
build_walk_through.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
## These instructions can be used to test build a container locally
## For use with snakemake, the container must be on singularity hub.
## To upload to singularity hub, you simply need to change the Singularity build definition and
push to the github repository associated with the singularity image.
See shub_upload_instructions.txt
#For setting up vagrant on mac, see singularity instructions
https://www.sylabs.io/guides/3.2/user-guide/installation.html#install-on-windows-or-mac
##TO BUILD VAGRANT VM## ----------------------------------------------
brew cask install virtualbox && \
brew cask install vagrant && \
brew cask install vagrant-manager
mkdir vm-singularity && \
cd vm-singularity
vagrant destroy && \
rm Vagrantfile
export VM=sylabs/singularity-3.2-ubuntu-bionic64 && \
vagrant init $VM && \
vagrant up && \
vagrant ssh
#This created this directory to contain the vm
~/Documents/vm-singularity
# I Added this to the vagrant file within the config section
# so that I can access the build_spec document
Vagrant.configure("2") do |config|
# ... other configuration
config.vm.provision "file", source: "~/Documents/projects/monogenic/singularity", destination: "$HOME/remote/singularity"
end
##RUN THE FOLLOWING FOR RUNNING THE VAGRANT VM ## ----------------------------
#This is the only command that needs to be done to start the vagrant session
#the provision flag makes sure that file provisioning is done, i.e. the desired files will be copied onto the vm for use
cd vm-singularity
vagrant up --provision && vagrant ssh
##To end
exit
## To stop VM
vagrant halt
##RUN THE FOLLOWING TO CREATE THE CONTAINER ## ----------------------------
sudo singularity build monogenic.sif singularity_build.def