Skip to content

Instantly share code, notes, and snippets.

@frankcarey
Last active August 29, 2015 14:16
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 frankcarey/94150bb6f698cee8a899 to your computer and use it in GitHub Desktop.
Save frankcarey/94150bb6f698cee8a899 to your computer and use it in GitHub Desktop.
Install pylearn

So much fun!! :/

This is what I did to get pylearn2 setup on ubuntu 14.04

Dependencies

Python 2.7 (only) sudo apt get install python ...

Theano (bleeding edge version is suggested/needed by pylearn installer) http://deeplearning.net/software/theano/install.html#bleeding-edge-install-instructions

iPython remoted

I want to use iPython notebooks for the tutorials, but use my laptop, so I need to use it remotely. http://stackoverflow.com/questions/24490278/run-ipython-notebook-from-a-remote-server

gpu Using the GPU

http://deeplearning.net/software/theano/install.html#using-the-gpu

Install cuda via https://developer.nvidia.com/cuda-downloads and downloaded the deb x64 package.. Then following http://docs.nvidia.com/cuda/cuda-getting-started-guide-for-linux/index.html#ubuntu-installation .. installed the deb package, updated the package database, and ran apt-get install cuda (this took a while and was like 1GB of space)

Next, I need to setup some flags at the post-install instructions at

Then also need to setup the theano cuda flags from http://deeplearning.net/software/theano/install.html#using-the-gpu http://docs.nvidia.com/cuda/cuda-getting-started-guide-for-linux/index.html#post-installation-actions

Plotting

You can use matlibplot for static plots, but bokeh gives you something interactive in ipython http://bokeh.pydata.org/en/latest/docs/quickstart.html#quickstart I used pip to install since i didn't have anaconda.. which failed until I used sudo. This also took a while to install .. maybe 30 minutes? I then tested it in ipython notebook using the following code:

from bokeh.plotting import figure, output_file, show
from bokeh.plotting import output_notebook
output_notebook()
p = figure()
for i in range(200):
    x = data[i][:,0]    # use the multidimensional slicing notation
    y = data[i][:,1]
    p.line(x,y)
show(p)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment