synchronization
This commit is contained in:
43
gpushare-device-plugin/demo/binpack-1/binpack-1.yaml
Normal file
43
gpushare-device-plugin/demo/binpack-1/binpack-1.yaml
Normal file
@@ -0,0 +1,43 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: binpack-1
|
||||
labels:
|
||||
app: binpack-1
|
||||
spec:
|
||||
ports:
|
||||
- port: 80
|
||||
name: web
|
||||
clusterIP: None
|
||||
selector:
|
||||
app: binpack-1
|
||||
|
||||
---
|
||||
apiVersion: apps/v1beta1
|
||||
kind: StatefulSet
|
||||
|
||||
metadata:
|
||||
name: binpack-1
|
||||
labels:
|
||||
app: binpack-1
|
||||
|
||||
spec:
|
||||
replicas: 3
|
||||
serviceName: "binpack-1"
|
||||
selector: # define how the deployment finds the pods it mangages
|
||||
matchLabels:
|
||||
app: binpack-1
|
||||
|
||||
template: # define the pods specifications
|
||||
metadata:
|
||||
labels:
|
||||
app: binpack-1
|
||||
|
||||
spec:
|
||||
containers:
|
||||
- name: binpack-1
|
||||
image: cheyang/gpu-player:v2
|
||||
resources:
|
||||
limits:
|
||||
# GiB
|
||||
aliyun.com/gpu-mem: 2
|
17
gpushare-device-plugin/demo/binpack-1/job.yaml
Normal file
17
gpushare-device-plugin/demo/binpack-1/job.yaml
Normal file
@@ -0,0 +1,17 @@
|
||||
apiVersion: batch/v1
|
||||
kind: Job
|
||||
metadata:
|
||||
name: gpu-job
|
||||
spec:
|
||||
backoffLimit: 0
|
||||
template:
|
||||
spec:
|
||||
containers:
|
||||
- name: gpu-job
|
||||
image: alpine:3.6
|
||||
resources:
|
||||
limits:
|
||||
# GiB
|
||||
aliyun.com/gpu-mem: 2
|
||||
command: ["sleep","30s"]
|
||||
restartPolicy: Never
|
Reference in New Issue
Block a user