Last active
May 19, 2016 00:05
-
-
Save MatthewVines/d58ac93687879a88db71dd703c4dc6d5 to your computer and use it in GitHub Desktop.
This file contains 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
########################################################################### | |
#Install VirtualBox https://www.virtualbox.org/wiki/Downloads | |
#Install Vagrant https://www.vagrantup.com/downloads.html | |
#Rename this file to Vagrantfile (no extension) | |
#In your favorite shell, navigate to the directory with this file | |
#type >> vagrant up | |
#wait for process to complete (will take a few minutes) | |
#once it is done, you can log into the virtual machine with | |
#username: vagrant password: vagrant | |
#in the vm type >> python /opt/battlecon-ai/src/BattleConAIFull.py | |
#enjoy BattleCon | |
#to close the vm from the host, you can type >> vagrant halt | |
#the next time you run vagrant up it will start up much faster. | |
########################################################################### | |
$script = <<SCRIPT | |
sudo apt-get upgrade | |
sudo apt-get -y install git | |
sudo add-apt-repository ppa:fkrull/deadsnakes-python2.7 | |
sudo apt-get update | |
sudo apt-get -y install python2.7 | |
sudo apt-get -y install python-setuptools python-dev build-essential | |
sudo apt-get -y install libblas-dev | |
sudo apt-get -y install liblapack-dev | |
sudo easy_install pip | |
sudo pip install numpy | |
sudo pip install cvxopt | |
#cd /usr/local/lib/python2.7/site-packages | |
cd /opt | |
git clone https://github.com/yaronvia/battlecon-ai.git | |
export PYTHONPATH=$PYTHONPATH:/opt/battlecon-ai/src | |
SCRIPT | |
Vagrant.configure(2) do |config| | |
box = "ubuntu/trusty64" | |
config.vm.define "bc_box" do |bc_box_config| | |
bc_box_config.vm.box = box | |
bc_box_config.vm.hostname = "bc-box" | |
bc_box_config.vm.provision :shell, inline: $script | |
bc_box_config.vm.provider "virtualbox" do |v| | |
v.memory = 2048 | |
v.gui = true | |
v.cpus = 2 | |
v.name = "bc_box" | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is a vagrant file to create a virtual machine running Yaron's BattleCon AI