-
Notifications
You must be signed in to change notification settings - Fork 548
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[k8s] Remove privileged container requirement to support GPU isolation (
#3443) * Add fuse device manager * Add resource field for checking fuse requirement * lint * lint * lint * lint * lint * comments * lint * fix * fix * fix backward compat * add comment
- Loading branch information
1 parent
281e489
commit 118fc79
Showing
11 changed files
with
281 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
sky/provision/kubernetes/manifests/smarter-device-manager-configmap.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: smarter-device-manager | ||
labels: | ||
parent: skypilot | ||
data: | ||
conf.yaml: | | ||
- devicematch: ^fuse$ | ||
nummaxdevices: 1000 # Max number of simultaneous pods that can use fuse |
65 changes: 65 additions & 0 deletions
65
sky/provision/kubernetes/manifests/smarter-device-manager-daemonset.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
# A daemonset for the smarter-device-manager agent. Used to expose FUSE devices | ||
# to SkyPilot pods, bypassing the need to run SkyPilot pods as privileged. | ||
# From smarter-device-manager daemonset: https://gitlab.com/arm-research/smarter/smarter-device-manager/-/blob/master/smarter-device-manager-ds.yaml | ||
apiVersion: apps/v1 | ||
kind: DaemonSet | ||
metadata: | ||
name: smarter-device-manager | ||
labels: | ||
name: smarter-device-manager | ||
role: agent | ||
parent: skypilot | ||
spec: | ||
selector: | ||
matchLabels: | ||
name: smarter-device-manager | ||
updateStrategy: | ||
type: RollingUpdate | ||
template: | ||
metadata: | ||
labels: | ||
name: smarter-device-manager | ||
parent: skypilot | ||
annotations: | ||
node.kubernetes.io/bootstrap-checkpoint: "true" | ||
spec: | ||
hostname: smarter-device-management | ||
hostNetwork: true | ||
dnsPolicy: ClusterFirstWithHostNet | ||
containers: | ||
- name: smarter-device-manager | ||
image: us-central1-docker.pkg.dev/skypilot-375900/skypilotk8s/smarter-device-manager:v1.1.2 | ||
imagePullPolicy: IfNotPresent | ||
securityContext: | ||
allowPrivilegeEscalation: false | ||
capabilities: | ||
drop: ["ALL"] | ||
resources: | ||
limits: | ||
cpu: 100m | ||
memory: 15Mi | ||
requests: | ||
cpu: 10m | ||
memory: 15Mi | ||
volumeMounts: | ||
- name: device-plugin | ||
mountPath: /var/lib/kubelet/device-plugins | ||
- name: dev-dir | ||
mountPath: /dev | ||
- name: sys-dir | ||
mountPath: /sys | ||
- name: config | ||
mountPath: /root/config | ||
volumes: | ||
- name: device-plugin | ||
hostPath: | ||
path: /var/lib/kubelet/device-plugins | ||
- name: dev-dir | ||
hostPath: | ||
path: /dev | ||
- name: sys-dir | ||
hostPath: | ||
path: /sys | ||
- name: config | ||
configMap: | ||
name: smarter-device-manager |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.