These Vagrant files automates the installation of a working Deep Learning machine running on Ubuntu 14.04.
What's in the box:
- Keras - minimalist, highly modular neural networks library.
- Tensorflow - library for numerical computation using data flow graphs.
- Jupyter - web application to create, share documents that contain live code, equations, visualizations and explanatory text.
- Anaconda - package manager and collection of libraries for scientific computing in python.
You must install VirtubalBox and Vagrant before continuing.
Windows Users: First and foremost, you should install git and gitbash. Go to this link, download the appropriate installer for your platform, and install git. Be sure to select the option for git-bash as well.
Now that you have Vagrant and VirtualBox (and gitbash) installed, clone or download this repository into a directory. The main files of interest are Vagrantfile
and bootstrap.sh
.
From this directory, let's start your Vagrant box by typing in your terminal (it might take some time to download the Ubuntu image):
$ vagrant up
Once the setup is complete, just run:
$ vagrant ssh
You are in!
To access files present on your computer from your Vagrant/Ubuntu machine, go to the /vagrant
directory which is mounted to the directory you started you Vagrant box from:
$ cd /vagrant/
To get a list of available vagrant commands (from your host computer), just type:
$ vagrant
If you want to start your virtual machine from scratch, disconnect from it and from your host computer run:
$ vagrant destroy
$ vagrant up
Note that you cannot simply call jupyter notebook
since the vagrant virtual machine is headless (has no gui interface). Port 8888 on the vm has been forwarded to the host machine. To run jupyter, in the vm run this command:
$ jupyter notebook --no-browser --ip=0.0.0.0 --port=8888
Your notebook should now be available on http://localhost:8888/. I have provided a tutorial jupyter notebook that introduces Keras with an example neural network on the MNIST dataset. You should be able to run it in your vm now.
-
vagrant up
command exits with an error saying thatforwarded port to 8888
is already in use by the host machine.- On Mac:
- Run
sudo lsof -i:8888
. This is to find the process which is using port8888
. - Copy the process's
PID
. This is the ProcessID associated to that process. - Run
kill <Paste ProcessID here>
. This is to terminate the process. - Run
vagrant up
again.
- Run
- On Mac:
-
When inside the Virtual Machine (after runing
vagrant ssh
) runningJupyter Notebook
results in a screen saying thatJupyter Notebook requires Javascript
.- Press
q
and theny
to exit that screen. - Press
ctrl
+c
to exit Jupyter. - Type
jupyter notebook --no-browser --ip=0.0.0.0 --port=8888
. - Jupyter Notebook should pop up in your browser.
- Press
For PyCharm integration with your Vagrant VM, check out the following pages: