In EECS 70, we will all be using the same Virtual Machine to complete the virtual labs. The course staff have configured a Virtual Machine Image with a recent version of Ubuntu Linux, Python 2.7, and several libraries we'll be using throughout the class.
Note 1: While you should also be able to set up a similar environment on your Mac or PC without needing a Virtual Machine, the course staff will not support such configurations - so you're on your own if you choose to go that route!
Note 2: The course staff will support Python/IPython as the official tool to complete the Virtual Labs. However, you are welcome to attempt the labs using other tools and languages (Matlab, R, Mathematica, Sage, etc.). If you do, please post your skeleton on Piazza (similar to the released IPython skeletons) to help other students using the same tool or language.
You only have to do this once. We recommend that you start as soon as possible and ask any questions you may have on Piazza.
Download and install the latest version of VirtualBox on your host computer, which can be any Intel-based Mac, Windows PC, or Linux box.
Download the VirtualBox Extension Pack for your VirtualBox's version and install it by double clicking on the downloaded file. This file is the same for all supported platforms.
Download the VM Image (~4GB).
Run VirtualBox and click File > Import Appliance (or Ctrl + I). Then select the image that you just downloaded (
eecs70.ova) and click OK.
Click Next, then Import. The Virtual Image is now being imported, and it will take some time.
When VirtualBox finishes Importing, select the VM (which should be in Powered Off mode), and click on Start (the green arrow button).
Wait for the VM to boot up and enter the password as shown on the wallpaper. You should now be able to log in to the official EECS 70 VM. Please ask on Piazza if you have any questions up to this checkpoint.
Make sure you have network access by opening the Firefox browser (icon located along left screen edge when VM is running) and visiting a popular site such as Google.com. Here is troubleshooting information if you have networking issues.
This will allow you to do copy and paste between your host computer and the virtual machine. However, if you're copying from or pasting to a terminal window within the VM then you should use Ctrl+Shift-C, Ctrl+Shift-V instead of the more usual Ctrl-C and Ctrl-V.
ipython nbconvert FILENAME.ipynb --to latex --post PDF --SphinxTransformer.author='YOUR NAME HERE'
Note: The instructions below are best served for Mac or Linux users. If you use Windows, you are encouraged to work inside the VM, or you may want to consult Google for similar instructions on Windows.
Good news -- you can still work on your local machine using your own browser! Follow the instructions below.
Select your VM inside VirtualBox Manager.
Go to Settings > Network > Adapter 1 > Port Forwarding.
Add a new rule with "name => ssh, protocol => TCP, Host Port => 3022, Guest Port => 22", and everything else BLANK.
INSIDE your VM, install the ssh server with
sudo apt-get install openssh-server. If it's already installed, that's fine.
ssh -p 3022 email@example.com
scp -P 3022 firstname.lastname@example.org:~/VM_DIRECTORY_NAME LOCAL_DIRECTORY_NAME
Enter the same login password when prompted
Optionally, you can look into SSH-ing without a password. There are many tutorials on the web, one of which can be found here.
To help double check that you get everything correctly, here's a screenshot of what you suppose to see after adding the above rule:
To start the notebook, run
ipython notebook --no-browser --ip='0.0.0.0' instead since the guest system won't expose
127.0.0.1 to other machine in the LAN.
localhost:8888 on your host browser, you will see the notebook page. Congrats, you can now work in your local browser!
If the ssh command is too long to type, put everything in a config file.
The config file is ~/.ssh/config, if it is not there, just create one.
Put the ssh host in the config file in the following format, notice the blank before User, Hostname, Port is a tab:
Host vm70 User eecs70 Hostname 127.0.0.1 Port 3022
ssh vm70to ssh into the VM. You now have a super efficient (and a bit overkill) setup to complete the lab! Keep these configurations and instructions for your upper division classes.
Q: I have an error installing Virtual Box / I can't get my VM to boot.
A: Sorry, but this is out of our reach. Your best bet is to consult Google.
Q: I'm following the instructions, but I get an error at step X. Help!
A: In this case, please also try to Google first. Chances are the problem has been solved (many times) in the past. If you find a fix, please post it on Piazza and share it with everyone. You are a wonderful human being for helping your classmates and instructors.
If you can't figure out what is going on, post on Piazza and make sure to describe the error in detail.
Q: How do I copy the lab and/or writeup back to my local machine for submission?
A: There are many ways. An easy solution would be to email it to yourself or upload it somewhere (Dropbox, Github, etc.) but please do NOT make it public. If you want, you can set up SSH/SCP (as seen in the Setting up SSH section), and scp your files back and forth.
Q: Ubuntu is prompting me to update or install a new package. What should I do?
A: If Ubuntu is prompting you to upgrade to its latest version (14.04 as of this writing), do NOT do it. Chances are upgrading will mess up a few different packages and may cause you problems completing the lab.
However, if Ubuntu is prompting you to update a few software packages (Firefox, etc.), then it doesn't matter if you do it or not. If you want to play it safe, don't update anything and just go with what we originally gave you. We will let you know via Piazza if there is a need to update any package.
Q: I think I found a better way to do step X / a typo in the instructions
A: Please let us know ASAP!
Much of the instructions above are borrowed from CS 169 and CS 194-16.
We would also like to thank Yan Zhao, Victor Lymar, and Sridatta Thatipamala, all CS 194-16 students in Spring 2014, for sharing the instructions on working on the host machine.