-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathVagrantfile
36 lines (30 loc) · 1.17 KB
/
Vagrantfile
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
ip = ENV.fetch("DOCKER_IP", "192.168.42.43")
port = ENV.fetch("DOCKER_PORT", "2735")
memory = ENV.fetch("DOCKER_MEMORY", "1024")
cpus = ENV.fetch("DOCKER_CPUS", "1")
args = ENV.fetch("DOCKER_ARGS", "")
synced_folder = '/Users'
unless args.empty?
args = "EXTRA_ARGS=#{args}"
end
Vagrant.configure("2") do |config|
config.vm.box = "dduportal/boot2docker"
config.vm.network "private_network", :ip => ip
config.vm.synced_folder synced_folder, synced_folder, :create => true
config.vm.provider :virtualbox do |v, override|
v.customize ["modifyvm", :id, "--nictype1", "virtio"]
v.customize ["modifyvm", :id, "--nictype2", "virtio"]
v.customize ["modifyvm", :id, "--natdnsproxy1", "on"]
v.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
v.customize ["modifyvm", :id, "--memory", Integer(memory)]
v.customize ["modifyvm", :id, "--cpus", Integer(cpus)]
end
config.vm.provision :shell,
path: "configure_docker.sh",
args: [port, args]
config.vm.provision :file,
source: "sklearn-notebook",
destination: "/tmp"
config.vm.provision :docker,
images: ["andaag/sklearn-notebook3", "andaag/large-notebook3" ]
end