Skip to content

Commit

Permalink
Use runtime option instead of using nvidia-docker command
Browse files Browse the repository at this point in the history
nvidia-docker binary is not available if user doesn't install
nvidia-docker2 package. This change uses runtime option instead
of using nvidia-docker command.

Signed-off-by: Gigon Bae <[email protected]>
  • Loading branch information
gigony committed Oct 26, 2023
1 parent 39a7348 commit 4b3d3b8
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion dockcross-manylinux2014-x64
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ fi
TTY_ARGS=
tty -s && [ -z "$MSYS" ] && TTY_ARGS=-ti
CONTAINER_NAME=dockcross_$RANDOM
nvidia-docker run $TTY_ARGS --name $CONTAINER_NAME \
docker run --runtime nvidia $TTY_ARGS --name $CONTAINER_NAME \
-v "$HOST_PWD":/work \
$HOST_VOLUMES \
"${USER_IDS[@]}" \
Expand Down
2 changes: 1 addition & 1 deletion python/cucim/docs/getting_started/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ After executing the command, type a password for the instance and open a web bro
```bash
...
Port 10001 would be used...(http://172.26.120.129:10001)
2021-02-13 01:12:44 $ nvidia-docker run --gpus all -it --rm -v /home/repo/cucim/notebooks:/notebooks -p 10001:10001 cucim-jupyter -c echo -n 'Enter New Password: '; jupyter lab --ServerApp.password="$(python3 -u -c "from jupyter_server.auth import passwd;pw=input();print(passwd(pw));" | egrep 'sha|argon')" --ServerApp.root_dir=/notebooks --allow-root --port=10001 --ip=0.0.0.0 --no-browser
2021-02-13 01:12:44 $ docker run --runtime nvidia --gpus all -it --rm -v /home/repo/cucim/notebooks:/notebooks -p 10001:10001 cucim-jupyter -c echo -n 'Enter New Password: '; jupyter lab --ServerApp.password="$(python3 -u -c "from jupyter_server.auth import passwd;pw=input();print(passwd(pw));" | egrep 'sha|argon')" --ServerApp.root_dir=/notebooks --allow-root --port=10001 --ip=0.0.0.0 --no-browser
Enter New Password: <password>
[I 2021-02-13 01:12:47.981 ServerApp] dask_labextension | extension was successfully linked.
[I 2021-02-13 01:12:47.981 ServerApp] jupyter_server_proxy | extension was successfully linked.
Expand Down
4 changes: 2 additions & 2 deletions run
Original file line number Diff line number Diff line change
Expand Up @@ -984,14 +984,14 @@ launch_notebooks() {

run_command cp ${TOP}/dist/*.whl ${TOP}/notebooks

run_command nvidia-docker build -t cucim-jupyter${gds_postfix} -f ${TOP}/docker/Dockerfile-jupyter${gds_postfix}-dev ${TOP}
run_command docker build --runtime nvidia -t cucim-jupyter${gds_postfix} -f ${TOP}/docker/Dockerfile-jupyter${gds_postfix}-dev ${TOP}

[ $? -ne 0 ] && return 1

c_echo W "Port " G "$port" W " would be used...(" B "http://$(hostname -I | cut -d' ' -f 1):${port}" W ")"

if [ -z "${gds_postfix}" ]; then
run_command nvidia-docker run --gpus all -it --rm \
run_command docker run --runtime nvidia --gpus all -it --rm \
-v ${TOP}/notebooks:/notebooks \
-p ${port}:${port} \
cucim-jupyter \
Expand Down
4 changes: 2 additions & 2 deletions scripts/run-dist
Original file line number Diff line number Diff line change
Expand Up @@ -307,14 +307,14 @@ launch_notebooks() {

run_command cp ${TOP}/*.whl ${TOP}/notebooks

run_command nvidia-docker build -t cucim-jupyter${gds_postfix} -f ${TOP}/docker/Dockerfile-jupyter${gds_postfix} ${TOP}
run_command docker build --runtime nvidia -t cucim-jupyter${gds_postfix} -f ${TOP}/docker/Dockerfile-jupyter${gds_postfix} ${TOP}

[ $? -ne 0 ] && return 1

c_echo W "Port " G "$port" W " would be used...(" B "http://$(hostname -I | cut -d' ' -f 1):${port}" W ")"

if [ -z "${gds_postfix}" ]; then
run_command nvidia-docker run --gpus all -it --rm \
run_command docker run --runtime nvidia --gpus all -it --rm \
-v ${TOP}/notebooks:/notebooks \
-p ${port}:${port} \
cucim-jupyter \
Expand Down

0 comments on commit 4b3d3b8

Please sign in to comment.