forked from Yorko/mlcourse.ai
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fixed volume mounting in toolbox; added ip discovery in toolbox mode
- Loading branch information
Showing
1 changed file
with
12 additions
and
6 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,26 @@ | ||
|
||
REM | ||
REM Attention: Windows Toolbox users - you MUST put the course repo in C:\Users\%username\mlcourse.ai | ||
REM Attention: Use Ctrl-C to shut down. If you close the window, the container may still be running. | ||
REM | ||
|
||
SET IMAGE="datamove/mlcourse_ai" | ||
|
||
REM check for new versin of the image | ||
docker pull %IMAGE% | ||
|
||
IF DEFINED DOCKER_TOOLBOX_INSTALL_PATH ( | ||
docker run -it --rm -u 1000:1000 -v /c/users/%username%/mlcourse.ai:/notebooks -w /notebooks -e HOME=/notebooks/home -p 4545:8888 %IMAGE% jupyter-notebook --NotebookApp.ip=0.0.0.0 --NotebookApp.password_required=False --NotebookApp.token='' --NotebookApp.custom_display_url="http://localhost:4545" | ||
FOR /F "tokens=* USEBACKQ" %%a in (`"docker-machine ip default"`) DO SET JUP_IP=%%a | ||
) | ||
|
||
IF DEFINED DOCKER_TOOLBOX_INSTALL_PATH ( | ||
|
||
docker run -it --rm -u 1000:1000 -v /c/Users/%username%/mlcourse.ai:/notebooks -w /notebooks -e HOME=/notebooks/home -p 4545:8888 %IMAGE% jupyter-notebook --NotebookApp.ip=0.0.0.0 --NotebookApp.password_required=False --NotebookApp.token='' --NotebookApp.custom_display_url=http://%JUP_IP%:4545 | ||
|
||
) ELSE ( | ||
|
||
docker run -it --rm -u 1000:1000 -v %cd%:/notebooks -w /notebooks -e HOME=/notebooks/home -p 4545:8888 %IMAGE% jupyter-notebook --NotebookApp.ip=0.0.0.0 --NotebookApp.password_required=False --NotebookApp.token='' --NotebookApp.custom_display_url="http://localhost:4545" | ||
) | ||
|
||
REM | ||
REM Attention: Windows Toolbox users - you MUST put the course repo in C:\Users\%username\mlcourse.ai | ||
REM Attention: Windows Toolbox users - check your URL in the docker controls. | ||
REM Attention: Use Ctrl-C to shut down. If you close the window, the container may still run. | ||
REM | ||
|
||
|