apiVersion: apps/v1
kind: Deployment
metadata:
  name: jupyter-deployment
spec:
  replicas: 1
  selector:
    matchLabels:
      app: jupyter-deployment
  strategy:
    type: Recreate
  template:
    metadata:
      labels:
        app: jupyter-deployment
    spec:
      containers:
        - image: hossein20s/jupyter:numpy                  
          name: jupyter-deployment
          workingDir: /home/developer/workspace
          imagePullPolicy: IfNotPresent
          resources: {}
          ports:
            - containerPort: 8888
          volumeMounts:
          - mountPath: "/home/developer/workspace"
            name: workspace
          - mountPath: "/root/.jupyter"
            name: workspace
            subPath: .jupyter
          # command: ["sh", "-c", "tail -f /dev/null"]
          command: ["sh", "-c", "jupyter notebook --port=8888 --no-browser --ip=0.0.0.0 --allow-root"]
      restartPolicy: Always
      volumes:
      - hostPath:
          path: /Users/hossein.akhlaghpour/workspace
          type: Directory
        name: workspace
status: {}

