Editing
Tutorials:Monitoring with Tensorboard on the GPU cluster
(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!
=== Local persistent volumes for Tensorboard logging === The following obtains a persistent volume claim for a local PV for data storage, as well as a PV for Tensorboard logging. Note that both can be done with a single config file. Code examples can be found in the subdirectory "example_2" of the tutorial sample code, [[File:Kubernetes_samples.zip|Kubernetes samples]]. As a first step, run the docker-compose and push the resulting container to the CCU registry, <syntaxhighlight lang="bash"> > docker-compose up --build [Wait a bit until the program has started, then ^C] > docker push ccu.uni-konstanz.de:5000/your.username/tf-mnist-tb:0.1 </syntaxhighlight> Also, create the Kubernetes scripts as before in the kubernetes subdirectory. Then, check out "pvc.yaml". <syntaxhighlight lang="yaml"> apiVersion: v1 kind: PersistentVolumeClaim metadata: # the name of the PVC, we refer to this in the container configuration name: your-username-tf-mnist-pvc spec: resources: requests: # storage resource request. This PVC can only be bound to volumes which # have at least 8 GiB of storage available. storage: 8Gi # the requested storage class here is fast data storage. storageClassName: local-ssd # leave these unchanged, they must match the PV type, otherwise binding will fail accessModes: - ReadWriteOnce volumeMode: Filesystem --- apiVersion: v1 kind: PersistentVolumeClaim metadata: # the second claim is for tensorboard logging, it needs its own ID. name: your-username-tf-mnist-tb-pvc spec: resources: requests: # Tensorboard logging typically requires not that much storage. storage: 2Gi # this storage class is parsed by the local Tensorboard instance # exposed to the network at port 6116. storageClassName: local-tensorboard # leave these unchanged, they must match the PV type, otherwise binding will fail accessModes: - ReadWriteOnce volumeMode: Filesystem </syntaxhighlight> Note that all names were prepended with your username to make them unique. When the claim is defined to your satisfaction, apply it like this: <syntaxhighlight lang="yaml"> > kubectl apply -f pvc.yml </syntaxhighlight> You can again check on the status of this (and every other) claim: <syntaxhighlight lang="yaml"> > kubectl get pvc NAME STATUS VOLUME CAPACITY ACCESS MODES STORAGECLASS AGE your-username-tf-mnist-pvc Pending local-ssd 11s your-username-tf-mnist-tb-pvc Pending local-tensorboard 11s </syntaxhighlight> Since the claim has not been used by a container yet, it is not yet bound to a persitent volume (PV). The contents of the PV can be accessed like any other PV, see previous tutorial.
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