Skip to content

Commit 3c9e858

Browse files
committed
added to example
1 parent 0eeff2f commit 3c9e858

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

examples/containers/container_deployments_example.py

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@
2020
QueueLoadScalingTrigger,
2121
UtilizationScalingTrigger,
2222
HealthcheckSettings,
23-
VolumeMount,
23+
ScratchMount,
2424
SecretMount,
25+
SharedFilesystemMount,
2526
ContainerRegistrySettings,
2627
Deployment,
27-
VolumeMountType,
2828
ContainerDeploymentStatus,
2929
)
3030

@@ -97,23 +97,24 @@ def main() -> None:
9797
path="/health"
9898
),
9999
volume_mounts=[
100-
# Shared memory volume
101-
VolumeMount(
102-
type=VolumeMountType.SCRATCH,
100+
ScratchMount(
103101
mount_path="/data"
104102
),
105-
# Fileset secret
103+
# Optional: Fileset secret
106104
SecretMount(
107105
mount_path="/path/to/mount",
108106
secret_name="my-fileset-secret" # This fileset secret must be created beforehand
109-
)
107+
),
108+
# Optional: Mount an existing shared filesystem volume
109+
SharedFilesystemMount(
110+
mount_path="/sfs", volume_id="<id-of-the-sfs-volume>"),
110111
],
111112
env=[
112113
# Secret environment variables needed to be added beforehand
113114
EnvVar(
114115
name="HF_TOKEN",
115116
# This is a reference to a secret already created
116-
value_or_reference_to_secret="hf_token",
117+
value_or_reference_to_secret="hf-token",
117118
type=EnvVarType.SECRET
118119
),
119120
# Plain environment variables can be added directly

0 commit comments

Comments
 (0)