Editing
Tutorials:container which trains MNIST using Tensorflow
(section)
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=== Inspecting a running container === Let's start the container in the background using the -d flag. Note that you will not see console output anymore. <syntaxhighlight lang="bash"> > docker-compose up --build -d </syntaxhighlight> The container is now listed under running containers. <syntaxhighlight lang="bash"> > docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES bcc2a2e8f42e ccu.uni-konstanz.de:5000/bastian.goldluecke/tf_mnist:0.1 "/application/run.sh" 6 minutes ago Up 6 minutes 6006/tcp example_1_application_1 </syntaxhighlight> We can check the console output by reading the logs, using the ID or the name of the container. <syntaxhighlight lang="bash"> > docker logs example_1_application_1 </syntaxhighlight> We can also open a shell inside the container, and inspect it's contents. In fact, you can also execute any other command in it. <syntaxhighlight lang="bash"> > docker exec -it example_1_application_1 /bin/bash root@fcb20664b49e:/workspace# nvidia-smi Wed Jun 5 10:06:31 2019 +-----------------------------------------------------------------------------+ | NVIDIA-SMI 418.67 Driver Version: 418.67 CUDA Version: 10.1 | |-------------------------------+----------------------+----------------------+ | GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC | | Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. | |===============================+======================+======================| | 0 Quadro GV100 On | 00000000:03:00.0 On | Off | | 38% 52C P2 42W / 250W | 30981MiB / 32475MiB | 1% Default | +-------------------------------+----------------------+----------------------+ root@fcb20664b49e:/workspace# ls /application nn.py run.sh tf-mnist.py root@fcb20664b49e:/workspace# </syntaxhighlight> We can also copy the output of the container into the filesystem of the host using an scp-like syntax: <syntaxhighlight lang="bash"> > docker cp example_1_application_1:/tmp/data ./tmp </syntaxhighlight> Once you are done with trying things out, stop the container with <syntaxhighlight lang="bash"> > docker kill example_1_application_1 </syntaxhighlight>
Summary:
Please note that all contributions to Collective Computational Unit may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
CCU:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
Page
Discussion
English
Views
Read
Edit
View history
More
Search
Navigation
Collective Computational Unit
Main page
Projects
Tutorials
GPU Cluster
Core Facilitys
Mediawiki
Recent changes
Random page
Help
Tools
What links here
Related changes
Page information