Kubernetes Setup (Alice O2)

The following two things differ for each user and thus cannot be part of the container:

The kubernetes naative solution for these are secrets and config maps. They are created by the following terminal commands.

where "/path/to/gitconfig" is a file containing the git config. Then we can "kubectl apply" the following yaml file:

apiVersion: v1
kind: Pod
metadata:
  name: o2-standalone
spec:
  containers:
  - name: o2-standalone
    image: oliverrietmann/o2-standalone:latest
    command: ["sh", "-c", "cp /root/secret/ssh-privatekey /root/.ssh/id_ecdsa && sleep infinity"]
    resources:
      limits:
        nvidia.com/gpu: 1
    securityContext:
      runAsUser: 0
      runAsGroup: 0
    volumeMounts:
    - name: ssh-volume
      mountPath: /root/secret
    - name: gitconfig
      mountPath: /root/.gitconfig
      subPath: .gitconfig
    - name: o2-alice-volume
      mountPath: /root/alice
    - name: o2-standalone-volume
      mountPath: /root/standalone
  volumes:
  - name: ssh-volume
    secret:
      secretName: ssh-secret
      defaultMode: 0600
  - name: gitconfig
    configMap:
      name: gitconfig
  - name: o2-alice-volume
    persistentVolumeClaim:
      claimName: o2-alice-pvc
  - name: o2-standalone-volume
    persistentVolumeClaim:
      claimName: o2-standalone-pvc
  nodeSelector:
    nvidia.com/gpu.product: NVIDIA-H100-NVL

---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: o2-alice-pvc
spec:
  accessModes:
    - ReadWriteOnce
  resources:
    requests:
      storage: 50Gi
  storageClassName: shared

---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: o2-standalone-pvc
spec:
  accessModes:
    - ReadWriteOnce
  resources:
    requests:
      storage: 10Gi
  storageClassName: shared

 

SoA Benchmarks

 

#include <vector>

struct SoA_Points { std::vector<float> x, y, z; };

struct S_ref { float &x, &y, &z; };

struct wrapper {
   SoA_Points soa_points;
   S_ref operator[]( int i ) {
      return { soa_points.x[i], soa_points.y[i], soa_points.z[i] };
    }
};

int main() {
int N = 100;
  wrapper w {{ std::vector<float>(N), std::vector<float>(N), std::vector<float>(N) }};
  w[42].x = 3; // Accesses all data members of soa_points, although only x is needed
return 0;
}