Last active
June 24, 2016 06:17
-
-
Save anemochore/22a694769e0358714ffb4890fc2f9602 to your computer and use it in GitHub Desktop.
commands for starting tensorflow in Windows
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
rem First, install Docker toolbox for Windows. | |
rem cf. http://www.netinstructions.com/how-to-install-and-run-tensorflow-on-a-windows-pc/ | |
set OLD_D=%cd% | |
cd /d "%DOCKER_TOOLBOX_INSTALL_PATH%" | |
start /min "Docker Toolbox" "%ProgramFiles%\Git\bin\bash.exe" --login -i start.sh | |
echo plz wait until 'Docker Toolbox' window finishes its initialization. | |
pause | |
FOR /f "tokens=*" %%i IN ('docker-machine env --shell cmd default') DO %%i | |
set DOCKER_HOST_HTTP=%DOCKER_HOST:~0,-4% | |
set DOCKER_HOST_HTTP=%DOCKER_HOST_HTTP:tcp=http% | |
set DOCKER_HOST_HTTP=%DOCKER_HOST_HTTP%8888 | |
start /b "" docker run -it -p 8888:8888 gcr.io/tensorflow/tensorflow | |
rem To use bash shell, | |
rem start "" docker run -it -p 8888:8888 gcr.io/tensorflow/tensorflow:latest-devel | |
echo plz wait until pulling is done and then refresh your browser. | |
start %DOCKER_HOST_HTTP% | |
cd /d %OLD_D% |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment