From 1ec7760b217a4b87c0565daa51ea0bf03c98d23d Mon Sep 17 00:00:00 2001 From: Alexander Zoechbauer Date: Mon, 4 Sep 2023 11:09:29 +0200 Subject: [PATCH] adding pods --- ai/containers/training-pod copy.yaml | 31 +++++++++++++++++++++++++++ ai/containers/training-pod-dummy.yaml | 23 ++++++++++++++++++++ ai/containers/training-pod-eos.yaml | 31 +++++++++++++++++++++++++++ ai/containers/training-pod.yaml | 22 +++++++++++-------- 4 files changed, 98 insertions(+), 9 deletions(-) create mode 100644 ai/containers/training-pod copy.yaml create mode 100644 ai/containers/training-pod-dummy.yaml create mode 100644 ai/containers/training-pod-eos.yaml diff --git a/ai/containers/training-pod copy.yaml b/ai/containers/training-pod copy.yaml new file mode 100644 index 00000000..3c7b6253 --- /dev/null +++ b/ai/containers/training-pod copy.yaml @@ -0,0 +1,31 @@ +apiVersion: v1 +kind: Pod +metadata: + name: training +spec: + containers: + - name: mlflow-container + image: ghcr.io/intertwin-eu/t6.5-ai-and-ml:containers + command: ["mlflow"] + args: ["server", "--backend-store-uri", "/home/T6.5-AI-and-ML/use-cases/mnist/data/ml-logs/"] + # volumeMounts: + # - name: shared-volume + # mountPath: /home/T6.5-AI-and-ML + - name: itwinai-container + image: ghcr.io/intertwin-eu/t6.5-ai-and-ml:containers + command: ["sleep", "100000"] + #args: ["/eos"] + volumeMounts: + - name: eos + mountPath: /eos + mountPropagation: HostToContainer + + volumes: + - name: eos + # Note the particularity of the host path being /var/eos, not /eos. + # The path inside the container will be /eos with this sample setup. + hostPath: + path: /var/eos + securityContext: + seLinuxOptions: + type: "spc_t" diff --git a/ai/containers/training-pod-dummy.yaml b/ai/containers/training-pod-dummy.yaml new file mode 100644 index 00000000..e00e665e --- /dev/null +++ b/ai/containers/training-pod-dummy.yaml @@ -0,0 +1,23 @@ +apiVersion: v1 +kind: Pod +metadata: + name: itwinai-training-sleep-dummy +spec: + containers: + - name: itwinai-container + image: ghcr.io/intertwin-eu/t6.5-ai-and-ml:containers + command: ["sleep", "10000000"] + #args: ["/eos"] + + nodeSelector: + kubernetes.io/role: agent + beta.kubernetes.io/os: linux + type: virtual-kubelet + kubernetes.io/hostname: jul-vk + tolerations: + - key: virtual-kubelet.io/provider + operator: Exists + - key: virtual-node.interlink/no-schedule + operator: Exists + - key: vk + operator: Exists diff --git a/ai/containers/training-pod-eos.yaml b/ai/containers/training-pod-eos.yaml new file mode 100644 index 00000000..3c7b6253 --- /dev/null +++ b/ai/containers/training-pod-eos.yaml @@ -0,0 +1,31 @@ +apiVersion: v1 +kind: Pod +metadata: + name: training +spec: + containers: + - name: mlflow-container + image: ghcr.io/intertwin-eu/t6.5-ai-and-ml:containers + command: ["mlflow"] + args: ["server", "--backend-store-uri", "/home/T6.5-AI-and-ML/use-cases/mnist/data/ml-logs/"] + # volumeMounts: + # - name: shared-volume + # mountPath: /home/T6.5-AI-and-ML + - name: itwinai-container + image: ghcr.io/intertwin-eu/t6.5-ai-and-ml:containers + command: ["sleep", "100000"] + #args: ["/eos"] + volumeMounts: + - name: eos + mountPath: /eos + mountPropagation: HostToContainer + + volumes: + - name: eos + # Note the particularity of the host path being /var/eos, not /eos. + # The path inside the container will be /eos with this sample setup. + hostPath: + path: /var/eos + securityContext: + seLinuxOptions: + type: "spc_t" diff --git a/ai/containers/training-pod.yaml b/ai/containers/training-pod.yaml index 82c3488a..3c7b6253 100644 --- a/ai/containers/training-pod.yaml +++ b/ai/containers/training-pod.yaml @@ -13,15 +13,19 @@ spec: # mountPath: /home/T6.5-AI-and-ML - name: itwinai-container image: ghcr.io/intertwin-eu/t6.5-ai-and-ml:containers - command: ["ls"] - args: ["/var"] + command: ["sleep", "100000"] + #args: ["/eos"] volumeMounts: - - name: test-volume - mountPath: /test_mount_dir + - name: eos + mountPath: /eos + mountPropagation: HostToContainer + volumes: - - name: test-volume + - name: eos + # Note the particularity of the host path being /var/eos, not /eos. + # The path inside the container will be /eos with this sample setup. hostPath: - # directory location on host - path: / - # this field is optional - type: Directory \ No newline at end of file + path: /var/eos + securityContext: + seLinuxOptions: + type: "spc_t"