how to set up tensorflow virtualenv and utilize jupyter notebook

This reviews my process of setting up tensorflow virtualenv in jupyter notebook in deepthought.ics.uci.edu Ubuntu machine for shoeprint classification project. Before this, I have successfully run the jupyter notebook script on my own MacOS and was able to train the model, but the process is pretty slow: it takes 20 min to train 15 echos with a training set of 60 images and a validation set of 40 images. 

1. installation on Mac:

    install virtualenv

    install tensorflow with virtualenv

    turn on jupyter notebook in tensorflow virtualenv (takes some uninstall first and install later, but cannot quite remember)

2. usage on Mac:

    source activate tensorflow

    jupyter notebook 

    ->open the script


3. install on deepthought:

    pip install virtualenv --user (this is important, which allows me to install under my own directory without having sudo authorization)

    install tensorflow with virtualenv: virtualenv --system-site-packages -p python3 (may not be exact, something like this)

    then install jupyter notebook:


4. usage on deepthought:

    cd ~ (to my home directory)

    source tensorflow/bin/activate tensorflow


5. set up jupyter notebook server and run on remote:

    1. turn on jupyter notebook server:

        from MacOS:

            login: ssh leix8@deepthought.ics.uci.edu 

            activate: virtual environment: source tensorflow/bin/activate tensorflow

            turn on kernel: ipython notebook --no-browser --port=8889

    2. then set up a ssh channel:

        from MacOS:

            ssh leix8@deepthought.ics.uci.edu -L127.0.0.1:1234:127.0.0.1:8889

            (then enter a password)

         go to browser and enter: http://127.0.0.1:1234 or http://localhost:1234



            

    

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容