apiVersion: v1
kind: Pod
metadata:
  # Change the name according to your need. A good name is descriptive and should tells information about what kind of experiment the pod will be used for. 
  name: vqa
spec:
  securityContext:
    # Replace NUMBER with the user id provided by the administrator
    runAsUser: 3001
    fsGroup: 3001
  containers:
    # name of the container running inside the pod. No need to update this
    - name: tf-container
      # Name of the docker image you want to run. The Kubernetes will pull the image from docker hub. The following image has tensorflow and some other python tools installed. This image is created using the Dockerfile available at: https://github.com/abhipec/iitg_kubernetes . According to your requirement, create the necessary image. 
      # iitg_kubernetes:p3_master_image_latest is the name of the image where several Machine Learning realted python 3 packages are already installed.
      # iitg_kubernetes:p2_master_image_latest is the name of the image where several Machine Learning related python 2 packages are already installed.
      image: shivangigarg24/vqa:latest
      imagePullPolicy: IfNotPresent

      # Once the container is started, the following command will be run. Note that all the data moved to the login node home directory will be accessible to the container in the /data/ directory.
      # command: [ "/bin/bash", "/data/what_ever_code_you_want_to_run" ]
      # For demo, to check working of kubernetes, comment the above command and uncomment the following commands.
      #command: [ "/bin/sleep", "120" ]
      # The above command will create the container, then run it for 120 seconds and then terminate.
      # If let say, you need to run a bash script, then the command woud be
      # command: [ "/bin/bash", "/data/research_papers_and_codes/2017_Deep_Video_Deblurring_For_Handheld_Cameras/zipfiles/DeepVideoDeblurring-master/run_pred.sh"]
      command: ["python3","/home/gdata/data/shivangi/openvqa/run.py"]
      args: ["--RUN=train", "--MODEL=mcan_small", "--DATASET=vqa"]
      # Request the number of GPU nodes.
      resources:
        limits:
          nvidia.com/gpu: 1
      volumeMounts:
        - name: nfs-data
          mountPath: /data
        - name: dshm
          mountPath: /dev/shm
  volumes:
  - name: nfs-data
    hostPath:
      # Replace the USERNAME with your login account name.
      path: /home/gdata/shivangi/
      type: Directory
  - name: dshm
    emptyDir: 
      medium: Memory
  # Do not change the below mentioned parameter.
  restartPolicy: Never
