GPU-Live/sample/jupyter_kustomize/base/tf.yaml

69 lines
1.3 KiB
YAML

apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: tf-notebook-pvc
namespace: org1
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi
storageClassName: user-nas
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: tf-notebook
labels:
workload-name: customer3
spec:
replicas: 1
selector:
matchLabels:
app: tf-notebook
workload-name: customer3
template:
metadata:
labels:
app: tf-notebook
workload-name: customer3
spec:
nodeSelector:
nodegroup: gpu
containers:
- name: tf-notebook
image: tensorflow/tensorflow:2.16.2-gpu-jupyter
resources:
limits:
cpu: "4"
memory: 16Gi
nvidia.com/gpu: 1
ports:
- containerPort: 8888
name: notebook
volumeMounts:
- name: notebook-storage
mountPath: /sample
volumes:
- name: notebook-storage
persistentVolumeClaim:
claimName: tf-notebook-pvc
---
apiVersion: v1
kind: Service
metadata:
name: tf-notebook
labels:
app: tf-notebook
workload-name: customer3
spec:
type: ClusterIP
ports:
- port: 80
name: http
targetPort: 8888
selector:
app: tf-notebook
workload-name: customer3