Changes

Jump to navigation Jump to search
m
Set up a Kubernetes job script
# container resources requested from the node
resources:
# requests are minimum resourcerequirements requests: # this gives us a minimum 2 GiB of main memory to work with. memory: "2Gi"  # limits are minimum requirementsmaximum resource allocations
limits:
# this gives us 2 an absolute limit of 3 GiB of main memory. Note that this is a hard limit,
# exceeding it will mean the container exits immediately with an error.
memory: "2Gi3Gi"
# this requests a number of GPUs. GPUs will be allocated to the container
#
# PLEASE DO NOT SET THE NUMBER TO ZERO, EVER, AND ALWAYS INCLUDE THIS LINE.
# ALWAYS PUT IT IN THE SECTION "limits", NOT "requests".
#
# It is a known limitation of nVidias runtime that if zero GPUs are requested,
#
nvidia.com/gpu: "1"
requests: memory: "2Gi" # the command which is executed after container creation
command: ["/application/run.sh"]
# number of retries after failure.
# since we typically have to fix something in this case, set to zero by default.
backoffLimit: 0</syntaxhighlight>
When we start this job, it will create a single container based on the image we previously uploaded to the registry on a suitable node which serves the selected namespace of the cluster.

Navigation menu