Last active
January 23, 2020 11:00
-
-
Save eduardomp/4c87749a6ce2a1b995cadc3b7c8c67e6 to your computer and use it in GitHub Desktop.
Vagrantfile for Tensorflow and Anaconda
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
Vagrant.configure(2) do |config| | |
config.vm.box = "ubuntu/trusty64" | |
config.vm.box_check_update = false | |
config.vm.synced_folder "workspace/", "/home/vagrant/workspace" | |
config.vm.network "public_network" | |
config.vm.network :forwarded_port, host: 8080, guest: 8080 | |
config.vm.network :forwarded_port, host: 8888, guest: 8888 | |
config.vm.network :forwarded_port, host: 6006, guest: 6006 | |
config.vm.boot_timeout = 600 | |
config.ssh.insert_key = true | |
config.vm.provision "shell", inline: <<-SHELL | |
#ENVIRONMENT | |
sudo echo "LANG=en_US.UTF-8" >> /etc/environment | |
sudo echo "LANGUAGE=en_US.UTF-8" >> /etc/environment | |
sudo echo "LC_ALL=en_US.UTF-8" >> /etc/environment | |
sudo echo "LC_CTYPE=en_US.UTF-8" >> /etc/environment | |
#REPOSITORIES | |
sudo apt-get update | |
sudo apt-get -y upgrade | |
#g++, git, curl... | |
echo "instalando g++..." | |
sudo apt-get install -y g++ | |
echo "instalando GIT..." | |
sudo apt-get install -y git | |
echo "instalando CURL..." | |
sudo apt-get install -y curl | |
#conda | |
echo "conda, python 3, jupyter, numpy, pandas, scikit-learn, matplotlib and tensorflow..." | |
curl -sO https://repo.continuum.io/archive/Anaconda3-5.0.1-Linux-x86_64.sh | |
sudo sh Anaconda3-5.0.1-Linux-x86_64.sh -b -p /home/vagrant/anaconda3 | |
export PATH="/home/vagrant/anaconda3/bin:$PATH" | |
echo 'export PATH="/home/vagrant/anaconda3/bin:$PATH"' >> /home/vagrant/.bashrc | |
conda create -n conda_root --clone="/home/vagrant/anaconda3" | |
source activate conda_root | |
conda update conda -y | |
conda install jupyter -y | |
conda install numpy -y | |
conda install pandas -y | |
conda install scikit-learn -y | |
conda install matplotlib -y | |
source deactivate | |
pip install --upgrade pip | |
pip install --upgrade tensorflow | |
SHELL | |
config.vm.provider :virtualbox do |vb| | |
vb.customize ["modifyvm", :id, "--memory", "2048"] | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment