Docker Container Did Not Hold in Detaching Mode

I’ve deployed successfully the docker container by following this instruction:

However, I cannot make the container can be run at the detaching mode. Furthermore, I want to use the Jupyter Notebook at another machine.

I’ve tried by command:

sudo docker run --runtime nvidia -it -d -p 8888:8888 --network host     --volume ~/nvdli-data:/nvdli-nano/data  --name dlinano --device /dev/video0 /bin/bash

However, there is no port is exported explicitly

CONTAINER ID        IMAGE                                           COMMAND             CREATED             STATUS              PORTS               NAMES
84f06b8d8e8d   "/bin/bash"         6 minutes ago       Up 6 minutes                            dlinano

Please help me on this problem. Thank you in advance.

Is the issue that you are specifying to run /bin/bash which is overriding the built-in CMD that starts the JupyterLab server?

Try removing the /bin/bash from the end of your docker run line, and then check the logs with sudo docker logs <container-id>to confirm that the JupyterLab server indeed started.

1 Like

Thank you so much for suggestion. Finally, I can make it run properly. I didn’t know that /bin/bash will override the provided commands.