Ying Ting Loo
02/28/2024, 6:37 AM"volumeMounts": {
"mountPath": "{{ mount_path }}",
"name": "{{ volume_name }}",
"subPath": "{{ sub_path }}"
}
how do i specify for when the specific flow does not need the extra mount?
also saw this https://discourse.prefect.io/t/how-to-mount-a-folder-on-my-local-filesystem-to-a-flow-run-pod-on-kubernetes/441 when i was searching. I dont want to put it into my image because the file will be huge and i dont want to download it repetitively everytime the job runs.Ying Ting Loo
03/04/2024, 9:07 AMYing Ting Loo
03/04/2024, 9:08 AM"job_configuration": {
"env": "{{ env }}",
"name": "{{ name }}",
"labels": "{{ labels }}",
"command": "{{ command }}",
"namespace": "{{ namespace }}",
"job_manifest": {
"kind": "Job",
"spec": {
"template": {
"spec": {
"volumes": [
{
"name": "{{ volume_name }}",
"persistantVolumeClaim": {
"claimName": "{{ volume_claim_name }}"
}
}
],
"containers": [
{
"env": "{{ env }}",
"args": "{{ command }}",
"name": "prefect-job",
"image": "{{ image }}",
"resources": {
"limits": {
"<http://nvidia.com/gpu|nvidia.com/gpu>": "{{ gpu_enabled }}"
},
"requests": {
"cpu": "{{ request_cpu }}",
"memory": "{{ request_memory }}"
}
},
"volumeMounts": [
{
"name": "{{ volume_name }}",
"subPath": "{{ sub_path }}",
"mountPath": "{{ mount_path }}"
}
],
"imagePullPolicy": "{{ image_pull_policy }}"
}
],
"completions": 1,
"parallelism": 1,
"restartPolicy": "Never",
"serviceAccountName": "{{ service_account_name }}"
}
},
"backoffLimit": 0,
"ttlSecondsAfterFinished": "{{ finished_job_ttl }}"
},
"metadata": {
"labels": "{{ labels }}",
"namespace": "{{ namespace }}",
"generateName": "{{ name }}-"
},
"apiVersion": "batch/v1"
},
"stream_output": "{{ stream_output }}",
"cluster_config": "{{ cluster_config }}",
"job_watch_timeout_seconds": "{{ job_watch_timeout_seconds }}",
"pod_watch_timeout_seconds": "{{ pod_watch_timeout_seconds }}"
}
Ying Ting Loo
03/04/2024, 10:19 AMpersistentVolumeClaim
in the job templateOlli Kavén
03/06/2024, 11:28 AMgpu_enabled
variable in prefect.yaml
?Ying Ting Loo
03/07/2024, 2:05 AM"<http://nvidia.com/gpu|nvidia.com/gpu>": "{{ gpu_enabled }}"