File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -54,8 +54,29 @@ See the [documentation for the GitLab fork of Docker Machine](../executors/docke
5454
5555## Kubernetes executor
5656
57- No runner configuration should be needed. Be sure to check that
58- [ the node selector chooses a node with GPU support] ( https://kubernetes.io/docs/tasks/manage-gpus/scheduling-gpus/ ) .
57+ Prerequisites:
58+
59+ - Ensure that [ the node selector chooses a node with GPU support] ( https://kubernetes.io/docs/tasks/manage-gpus/scheduling-gpus/ ) .
60+ - Enable the ` FF_USE_ADVANCED_POD_SPEC_CONFIGURATION ` feature flag.
61+
62+ To enable GPU support, configure the runner to request GPU resources in the pod specification. For example:
63+
64+ ``` toml
65+ [[runners .kubernetes .pod_spec ]]
66+ name = " gpu"
67+ patch = '''
68+ containers:
69+ - name: build
70+ resources:
71+ requests:
72+ nvidia.com/gpu: 1
73+ limits:
74+ nvidia.com/gpu: 1
75+ '''
76+ patch_type = " strategic" # <--- `strategic` patch_type
77+ ```
78+
79+ Adjust the GPU count in ` requests ` and ` limits ` based on your job requirements.
5980
6081GitLab Runner has been [ tested on Amazon Elastic Kubernetes Service] ( https://gitlab.com/gitlab-org/gitlab-runner/-/issues/4355 )
6182with [ GPU-enabled instances] ( https://docs.aws.amazon.com/dlami/latest/devguide/gpu.html ) .
You can’t perform that action at this time.
0 commit comments