How to setup learning environment for Udacity Deep Learning class with TensorFlow (Windows)

后端 未结 4 480
陌清茗
陌清茗 2021-02-02 02:37

I believe many of those interested in studying DL heard of this course:

https://www.udacity.com/course/deep-learning--ud730

I am taking the course now and would

4条回答
  •  无人共我
    2021-02-02 03:22

    Complementing to the other answers here is my starting script for creation/running/starting of a docker machine. Setup proceedure now boils down to installing the latest version of docker toolbox (this should autom. install vbox) from https://docs.docker.com/toolbox/toolbox_install_windows/ and running the script:

    @echo off
    set DOCKERMACHINENAME=tensorflow-udacity
    set REPOSITORY=gcr.io/tensorflow/udacity-assignments:0.6.0
    set "LOCALDIR0=/%SystemDrive:~0,1%/"
    call :LoCase LOCALDIR0
    SET "LOCALDIR=%LOCALDIR0%Users/%USERNAME%"
    docker-machine.exe env %DOCKERMACHINENAME% > nul 2> nul
    if "%errorlevel%"=="0" goto m_exists
    ::Machine has to be created
    docker-machine create -d virtualbox --virtualbox-memory 8196 %DOCKERMACHINENAME%
    
    :m_exists
    
    ::Check if machine needs to be restarted
    docker-machine ip %DOCKERMACHINENAME% > nul 2>nul
    if not "%errorlevel%"=="0" (docker-machine.exe restart %DOCKERMACHINENAME%)
    
    FOR /F "tokens=*" %%i IN ('docker-machine env --shell cmd %DOCKERMACHINENAME%') DO %%i
    FOR /F "tokens=*" %%F IN ('docker-machine ip %DOCKERMACHINENAME%') DO (SET DOCKERMACHINEIP=%%F)
    echo Access to iPython: %DOCKERMACHINEIP%:8888
    
    docker inspect %DOCKERMACHINENAME% > nul 2> nul
    if "%errorlevel%"=="0" goto m_started
    :: Machine has to be started
    docker run -p 8888:8888 --name %DOCKERMACHINENAME% -v %LOCALDIR%:/mnt/hosttmp:rw -it %REPOSITORY%
    goto finished
    
    :m_started
    docker start -ai %DOCKERMACHINENAME%
    goto finished
    
    :LoCase
    FOR %%i IN ("A=a" "B=b" "C=c" "D=d" "E=e" "F=f" "G=g" "H=h" "I=i" "J=j" "K=k" "L=l" "M=m" "N=n" "O=o" "P=p" "Q=q" "R=r" "S=s" "T=t" "U=u" "V=v" "W=w" "X=x" "Y=y" "Z=z") DO CALL SET "%1=%%%1:%%~i%%"
    
    :finished
    ::hint: to remove container use: docker rm %DOCKERMACHINENAME%
    

提交回复
热议问题