My final goal is to start-up a docker container and move some files around in that docker container. Because this takes several commands, I want to write a script that does this automatically (as opposed to writing all these commands each time by hand). My plan here is to create a bash-script for this.
The problem starts right after the first command:
nvidia-docker run -it --name "Test" gcr.io/tensorflow/tensorflow:latest-gpu
This put the following output on screen (in the same GUI as the Ubuntu terminal I wrote the command in):
[I 14:42:36.484 NotebookApp] Writing notebook server cookie secret to /root/.local/share/jupyter/runtime/notebook_cookie_secret [W 14:42:36.509 NotebookApp] WARNING: The notebook server is listening on all IP addresses and not using encryption. This is not recommended. [I 14:42:36.513 NotebookApp] Serving notebooks from local directory: /notebooks [I 14:42:36.513 NotebookApp] 0 active kernels [I 14:42:36.513 NotebookApp] The Jupyter Notebook is running at: http://[all ip addresses on your system]:8888/?token=6731bf8e21c987cd142076cbeb77ed3cf0f97275bcdb7bce [I 14:42:36.513 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation). [C 14:42:36.513 NotebookApp]
Now I can 'exit' this by typing ctrl+C, which allows me to go 'back' to the original terminal (still, same GUI) and start typing Ubuntu terminal commands again. But how do I replicate this action in a script?