apiVersion: apps/v1 kind: Deployment metadata: name: jupyter-deployment spec: replicas: 1 strategy: type: "Recreate" selector: matchLabels: app: jupyter template: metadata: labels: app: jupyter pod.staroid.com/isolation: dedicated # see https://docs.staroid.com/ske/pod.html#pod for more available options pod.staroid.com/spot: "false" pod.staroid.com/instance-type: gpu-1 spec: automountServiceAccountToken: true securityContext: runAsUser: 1000 # staroid requires non-root container runAsGroup: 100 # writable directories are accessible with GID 100. see https://github.com/jupyter/docker-stacks/blob/master/base-notebook/Dockerfile containers: - name: jupyter image: jupyter command: - "bash" - "-c" - >- jupyter-lab --ip='*' --NotebookApp.token='' --NotebookApp.password='' --NotebookApp.allow_origin='*' env: - name: JUPYTER_ENABLE_LAB value: "yes" volumeMounts: - name: work-volume mountPath: /home/jovyan/work volumes: - name: work-volume persistentVolumeClaim: claimName: work --- kind: Service apiVersion: v1 metadata: name: jupyter spec: ports: - name: http port: 8888 selector: app: jupyter --- apiVersion: v1 kind: PersistentVolumeClaim metadata: name: work annotations: storage.staroid.com/scope: Instance # see https://docs.staroid.com/ske/storage.html for available scope storage.staroid.com/file-manager: "1000:100" # of file manager pod. This will display file manager button on staroid management console spec: storageClassName: nfs accessModes: - ReadWriteMany volumeMode: Filesystem resources: requests: storage: 1Gi