Last active
December 23, 2017 13:18
-
-
Save newtover/365cd9df859008f8d6c3040dcf8248e1 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
Vagrant.configure("2") do |config| | |
config.vm.box = "bento/ubuntu-16.04" | |
# https://www.vagrantup.com/docs/networking/forwarded_ports.html | |
# it's useful to have a predictable port pattern for different vagrant instances (here 10000 + n) | |
config.vm.network "forwarded_port", guest: 5000, host: 10080, host_ip: "127.0.0.1" | |
config.vm.network "forwarded_port", guest: 22, host: 10022, id: "ssh" | |
# Work around disconnected virtual network cable. | |
config.vm.provider "VirtualBox" do |vb| | |
vb.customize ["modifyvm", :id, "--cableconnected1", "on", "--memory", "4096"] | |
vb.cpus = 2 | |
end | |
# https://www.vagrantup.com/docs/provisioning/shell.html | |
config.vm.provision "shell", privileged: false, inline: <<-SHELL | |
# fetch fresh apt lists | |
sudo apt-get -qqy update | |
# upgrade installed packages | |
# https://github.com/mitchellh/vagrant/issues/289 | |
sudo DEBIAN_FRONTEND=noninteractive apt-get -qqy upgrade | |
# gcc, etc. | |
# sudo apt-get -qqy install build-essential | |
# required for uwsgi installed for built in python | |
# sudo apt-get -qqy install libpcre3 libpcre3-dev | |
curl -O https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh | |
bash Miniconda3-latest-Linux-x86_64.sh -b | |
printf "\nexport PATH=/home/vagrant/miniconda3/bin:\$PATH\n\n" >> ~/.bashrc | |
export PATH=/home/vagrant/miniconda3/bin:$PATH | |
vagrantTip="[35m[1mThe shared directory is located at /vagrant\nTo access your shared files: cd /vagrant\n" | |
sudo sh -c "printf '$vagrantTip' > /etc/motd" | |
echo "Done installing your virtual machine!" | |
SHELL | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment