File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change 1- # pyright: reportExplicitAny =false
2- from typing import Any
1+ # pyright: reportUnusedParameter =false
2+ from kubernetes_typed . client import V1JobDict , V1ResourceRequirementsDict
33
44rsync_script = """
55set -e
@@ -41,10 +41,12 @@ def build_job_body(
4141 context_dir : str ,
4242 jobs_dir : str ,
4343 getlist_path : str ,
44- ) -> dict [ str , Any ] :
44+ ) -> V1JobDict :
4545 """
4646 Build a batch/v1 Job as a dict to pass to oc.create()
4747 """
48+
49+ resources : V1ResourceRequirementsDict
4850 if gpu == "none" :
4951 resources = {
5052 "requests" : {"cpu" : "1" , "memory" : "1Gi" },
@@ -67,7 +69,7 @@ def build_job_body(
6769 else :
6870 command = ["/bin/bash" , "-c" , cmdline ]
6971
70- body = {
72+ body : V1JobDict = {
7173 "apiVersion" : "batch/v1" ,
7274 "kind" : "Job" ,
7375 "metadata" : {
You can’t perform that action at this time.
0 commit comments