stat157 / analyzers

1 stars 3 forks source link

Customized Vagrant box #9

Closed kqdtran closed 10 years ago

kqdtran commented 10 years ago

I package a Vagrant box that has (mostly) everything installed, from NumPy/Pandas to ggplot, and a customized .bashrc for Virtualenv development within the VM. I haven't tested it very carefully, but it seems to work on my machine. Could someone download it, vagrant up, and let me know if it works? Thanks!

Download link: https://www.dropbox.com/s/5rgfq8nedjxgm0c/package.box (1.6 Gb)

After you download it, run

$ vagrant box add 157box package.box
$ vagrant init 157box
$ vagrant up
$ vagrant ssh

... and hopefully it will work D:

To start up the analyzers repo, do

cd analyzers/notebooks

workon 157  # this is to start the virtual environment with everything installed. 
# You should see the change from
# vagrant@precise64:~/analyzers$
# to
# (157)vagrant@precise64:~/analyzers$
#, which means that you're now in the virtual environment

ipython notebook --ip=0.0.0.0 --no-browser --pylab=inline

and point to port 8888 on your local machine (localhost:8888). If that doesn't work, there's a very good chance your Virtualbox's port forwarding was not set up the way Chris showed us at the beginning of the semester... We may want to look into how to do it.

See Teresa's comment below on setting up git and alias.

teresita commented 10 years ago

:+1:

teresita commented 10 years ago

issues we need to address:

git remote rm origin
git remote add https://github.com/stat157/analyzers.git
git pull origin master
workon 157
alias ipy='ipython notebook --ip=0.0.0.0 --no-browser --pylab=inline --script'

then you can just type ipy to start the ipython notebook. we need to clarify which IP to navigate to in the browser, though.

teresita commented 10 years ago

edit the Vagrantfile to add these two lines below line 22:

  config.vm.network :forwarded_port, guest: 80, host: 8080
  config.vm.network :forwarded_port, guest: 8888, host: 7777