File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed
Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change 1212from datacrunch .containers .containers import (
1313 Container ,
1414 ComputeResource ,
15+ EnvVar ,
16+ EnvVarType ,
1517 ScalingOptions ,
1618 ScalingPolicy ,
1719 ScalingTriggers ,
@@ -104,6 +106,21 @@ def main() -> None:
104106 type = VolumeMountType .SCRATCH ,
105107 mount_path = "/data"
106108 )
109+ ],
110+ env = [
111+ # Secret environment variables needed to be added beforehand
112+ EnvVar (
113+ name = "HF_TOKEN" ,
114+ # This is a reference to a secret already created
115+ value_or_reference_to_secret = "hf_token" ,
116+ type = EnvVarType .SECRET
117+ ),
118+ # Plain environment variables can be added directly
119+ EnvVar (
120+ name = "VERSION" ,
121+ value_or_reference_to_secret = "1.5.2" ,
122+ type = EnvVarType .PLAIN
123+ )
107124 ]
108125 )
109126
You can’t perform that action at this time.
0 commit comments