美文网首页
how to set up tensorflow virtual

how to set up tensorflow virtual

作者: Lei_x | 来源:发表于2018-11-06 08:12 被阅读0次

    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

                

        

    相关文章

      网友评论

          本文标题:how to set up tensorflow virtual

          本文链接:https://www.haomeiwen.com/subject/xxdyxqtx.html