Files
Olares/build/installer/deploy/scheduler.yaml

68 lines
2.1 KiB
YAML

# Copyright (c) 2023 Georgios Alexopoulos
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: nvshare-scheduler
namespace: nvshare-system
spec:
selector:
matchLabels:
name: nvshare-scheduler
template:
metadata:
labels:
name: nvshare-scheduler
spec:
runtimeClassName: nvidia # Explicitly request the runtime
priorityClassName: system-node-critical
nodeSelector:
gpu.bytetrade.io/cuda-supported: 'true'
initContainers:
- name: init-dir
image: busybox:1.28
volumeMounts:
- name: nvshare-socket-directory
mountPath: /var/run/nvshare
command:
- sh
- -c
- "[ -d /var/run/nvshare/scheduler.sock ] && rm -rf /var/run/nvshare/scheduler.sock || true"
containers:
- name: nvshare-scheduler
image: bytetrade/nvshare:nvshare-scheduler
imagePullPolicy: IfNotPresent
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop: ["ALL"]
command:
- sh
- -c
- "test -f /var/run/nvshare/scheduler.sock && rm -rf /var/run/nvshare/scheduler.sock; pid1 nvshare-scheduler"
volumeMounts:
- name: nvshare-socket-directory
mountPath: /var/run/nvshare
volumes:
- name: nvshare-socket-directory
hostPath:
path: /var/run/nvshare
type: DirectoryOrCreate
tolerations:
- key: nvidia.com/gpu
operator: Exists
effect: NoSchedule