Fix Repository Name Error and Enhance User Experience

This commit is contained in:
rmcc3 2024-03-31 01:08:52 -04:00 committed by GitHub
parent a6a67899a8
commit 2f78e8d435
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 26 additions and 18 deletions

View File

@ -1,21 +1,29 @@
:: Windows Docker Context Batch File
:: No need to install nvidia toolkit as Windows driver supports docker GPUs
:: Credit to github/jay-c88 for this
:: https://github.com/jasonppy/VoiceCraft/pull/25#issuecomment-2028053878
@echo off
docker start jupyter > nul 2> nul || ^
docker run -it ^
-d ^
--gpus all ^
-p 8888:8888 ^
--name jupyter ^
--user root ^
-e NB_USER="%username%" ^
-e CHOWN_HOME=yes ^
-e GRANT_SUDO=yes ^
-w "/home/%username%" ^
-v %cd%:"/home/%username%/work" ^
jupyter/base-notebook
echo Creating and running the Jupyter container...
pause
docker run -it -d ^
--gpus all ^
-p 8888:8888 ^
--name jupyter ^
--user root ^
-e NB_USER="%username%" ^
-e CHOWN_HOME=yes ^
-e GRANT_SUDO=yes ^
-e JUPYTER_TOKEN=mytoken ^
-w "/home/%username%" ^
-v "%cd%":"/home/%username%/work" ^
jupyter/base-notebook
if %errorlevel% == 0 (
echo Jupyter container created and running.
echo Jupyter container is running.
echo To access the Jupyter web UI, please follow these steps:
echo 1. Open your web browser
echo 2. Navigate to http://localhost:8888/?token=mytoken
echo 3. !! The default token is "mytoken" and should be changed. !!
pause
) else (
echo Failed to create and run the Jupyter container.
)