Skip to content

Commit 44c39dc

Browse files
committed
Use runtime option instead of using nvidia-docker command
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]>
1 parent ca85068 commit 44c39dc

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

dockcross-manylinux2014-x64

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ fi
233233
TTY_ARGS=
234234
tty -s && [ -z "$MSYS" ] && TTY_ARGS=-ti
235235
CONTAINER_NAME=dockcross_$RANDOM
236-
nvidia-docker run $TTY_ARGS --name $CONTAINER_NAME \
236+
docker run --runtime nvidia $TTY_ARGS --name $CONTAINER_NAME \
237237
-v "$HOST_PWD":/work \
238238
$HOST_VOLUMES \
239239
"${USER_IDS[@]}" \

python/cucim/docs/getting_started/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ After executing the command, type a password for the instance and open a web bro
9999
```bash
100100
...
101101
Port 10001 would be used...(http://172.26.120.129:10001)
102-
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
102+
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
103103
Enter New Password: <password>
104104
[I 2021-02-13 01:12:47.981 ServerApp] dask_labextension | extension was successfully linked.
105105
[I 2021-02-13 01:12:47.981 ServerApp] jupyter_server_proxy | extension was successfully linked.

run

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -984,14 +984,14 @@ launch_notebooks() {
984984

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

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

989989
[ $? -ne 0 ] && return 1
990990

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

993993
if [ -z "${gds_postfix}" ]; then
994-
run_command nvidia-docker run --gpus all -it --rm \
994+
run_command docker run --runtime nvidia --gpus all -it --rm \
995995
-v ${TOP}/notebooks:/notebooks \
996996
-p ${port}:${port} \
997997
cucim-jupyter \

scripts/run-dist

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -307,14 +307,14 @@ launch_notebooks() {
307307

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

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

312312
[ $? -ne 0 ] && return 1
313313

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

316316
if [ -z "${gds_postfix}" ]; then
317-
run_command nvidia-docker run --gpus all -it --rm \
317+
run_command docker run --runtime nvidia --gpus all -it --rm \
318318
-v ${TOP}/notebooks:/notebooks \
319319
-p ${port}:${port} \
320320
cucim-jupyter \

0 commit comments

Comments
 (0)