Skip to content

Instantly share code, notes, and snippets.

@MatthewVines
Last active May 19, 2016 00:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MatthewVines/d58ac93687879a88db71dd703c4dc6d5 to your computer and use it in GitHub Desktop.
Save MatthewVines/d58ac93687879a88db71dd703c4dc6d5 to your computer and use it in GitHub Desktop.
###########################################################################
#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
@MatthewVines
Copy link
Author

This is a vagrant file to create a virtual machine running Yaron's BattleCon AI

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment