Using EECS Instructional Machines

The EECS instructional machines have anaconda and jupyter notebook available. Some machines, e.g. the hive cluster, also have Nvidia GPUs. To use them, first activate an anaconda environment:

export PATH=/share/instsww/anaconda/bin:$PATH
source activate jupyter3

Assuming you have downloaded and unpacked the code for an assignment such as assignment2, create your own virtual environment:

cd assignment2
virtualenv -p python3 myenv

Once you've done this, you no longer need to be in the initial anaconda environment so you can do:

deactivate

Now that you have your own virtualenv, you dont need to set the path to anaconda next time. Simply cd to the assignment2 directory and do:

source myenv/bin/activate

Before you install the requirements, edit requirements.txt and remove all versions of ipython, jupyter and pyzmq. These are all dependencies of jupyter and you dont need them (and they wont build anyway). Finally install your edited requirements:

pip3 install -r requirements.txt

There will likely be a problem with traitlet versions, so do:

pip install traitlets --upgrade

Finally, you can install tensorflow. If you'll be using a GPU machine, do:

pip3 install tensorflow-gpu==1.4.0

Otherwise do:

pip3 install tensorflow==1.4.0

If you're not sure, you might as well create two virtualenvs for GPU or CPU machines.

Finally, before running tensorflow on a GPU machine, you need to set your library path to include CUDA 8.0 and the CUDNN library. So do:

export LD_LIBRARY_PATH=/home/ff/cs194/cs194-129/lib64:/usr/local/cuda/lib64:$LD_LIBRARY_PATH

if using the machines regularly, its best to do this in your shell init script.