add jupyter
This commit is contained in:
parent
aae999292c
commit
dbe50f31db
|
|
@ -0,0 +1,81 @@
|
||||||
|
apiVersion: v1
|
||||||
|
kind: PersistentVolumeClaim
|
||||||
|
metadata:
|
||||||
|
name: tf-lab-pvc
|
||||||
|
spec:
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteOnce
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: 1Gi
|
||||||
|
storageClassName: nfs-client
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: tf-lab
|
||||||
|
labels:
|
||||||
|
app: tf-lab
|
||||||
|
spec:
|
||||||
|
type: ClusterIP
|
||||||
|
ports:
|
||||||
|
- port: 80
|
||||||
|
name: http
|
||||||
|
targetPort: 8888
|
||||||
|
selector:
|
||||||
|
app: tf-lab
|
||||||
|
---
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: tf-lab
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: tf-lab
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: tf-lab
|
||||||
|
spec:
|
||||||
|
nodeSelector:
|
||||||
|
nodegroup: gpu
|
||||||
|
containers:
|
||||||
|
- name: tf-lab
|
||||||
|
image: tensorflow/tensorflow:2.16.2-gpu-jupyter
|
||||||
|
resources:
|
||||||
|
limits:
|
||||||
|
nvidia.com/gpu: 1
|
||||||
|
ports:
|
||||||
|
- containerPort: 8888
|
||||||
|
name: lab
|
||||||
|
volumeMounts:
|
||||||
|
- name: lab-storage
|
||||||
|
mountPath: /sample
|
||||||
|
volumes:
|
||||||
|
- name: lab-storage
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: tf-lab-pvc
|
||||||
|
---
|
||||||
|
apiVersion: networking.k8s.io/v1
|
||||||
|
kind: Ingress
|
||||||
|
metadata:
|
||||||
|
name: ing-tf-lab
|
||||||
|
spec:
|
||||||
|
ingressClassName: nginx
|
||||||
|
rules:
|
||||||
|
- host: lab.nhngpuaas.com
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /lab
|
||||||
|
pathType: Prefix
|
||||||
|
backend:
|
||||||
|
service:
|
||||||
|
name: tf-lab
|
||||||
|
port:
|
||||||
|
number: 80
|
||||||
|
tls:
|
||||||
|
- hosts:
|
||||||
|
- "lab.nhngpuaas.com"
|
||||||
|
secretName: nhngpuaas-ssl
|
||||||
|
|
@ -0,0 +1,81 @@
|
||||||
|
apiVersion: v1
|
||||||
|
kind: PersistentVolumeClaim
|
||||||
|
metadata:
|
||||||
|
name: tf-notebook-pvc
|
||||||
|
spec:
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteOnce
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: 1Gi
|
||||||
|
storageClassName: nfs-client
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: tf-notebook
|
||||||
|
labels:
|
||||||
|
app: tf-notebook
|
||||||
|
spec:
|
||||||
|
type: ClusterIP
|
||||||
|
ports:
|
||||||
|
- port: 80
|
||||||
|
name: http
|
||||||
|
targetPort: 8888
|
||||||
|
selector:
|
||||||
|
app: tf-notebook
|
||||||
|
---
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: tf-notebook
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: tf-notebook
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: tf-notebook
|
||||||
|
spec:
|
||||||
|
nodeSelector:
|
||||||
|
nodegroup: gpu
|
||||||
|
containers:
|
||||||
|
- name: tf-notebook
|
||||||
|
image: tensorflow/tensorflow:2.16.2-gpu-jupyter
|
||||||
|
resources:
|
||||||
|
limits:
|
||||||
|
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: networking.k8s.io/v1
|
||||||
|
kind: Ingress
|
||||||
|
metadata:
|
||||||
|
name: ing-tf
|
||||||
|
spec:
|
||||||
|
ingressClassName: nginx
|
||||||
|
rules:
|
||||||
|
- host: tf.nhngpuaas.com
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: Prefix
|
||||||
|
backend:
|
||||||
|
service:
|
||||||
|
name: tf-notebook
|
||||||
|
port:
|
||||||
|
number: 80
|
||||||
|
tls:
|
||||||
|
- hosts:
|
||||||
|
- "tf.nhngpuaas.com"
|
||||||
|
secretName: nhngpuaas-ssl
|
||||||
Loading…
Reference in New Issue