From eca239a252b323b1944c248c8d2f055ac475dd57 Mon Sep 17 00:00:00 2001 From: Tamir Date: Fri, 4 Apr 2025 11:18:35 +0300 Subject: [PATCH 1/3] added memory enum and size field --- datacrunch/containers/containers.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/datacrunch/containers/containers.py b/datacrunch/containers/containers.py index ef7f890..7221610 100644 --- a/datacrunch/containers/containers.py +++ b/datacrunch/containers/containers.py @@ -19,6 +19,7 @@ class EnvVarType(str, Enum): class VolumeMountType(str, Enum): SCRATCH = "scratch" SECRET = "secret" + MEMORY = "memory" class ContainerRegistryType(str, Enum): @@ -82,7 +83,7 @@ class EnvVar: type: EnvVarType -@dataclass_json +@dataclass_json(undefined=Undefined.EXCLUDE) @dataclass class VolumeMount: """Volume mount configuration for containers. @@ -92,6 +93,7 @@ class VolumeMount: """ type: VolumeMountType mount_path: str + size_in_gb: Optional[int] = None @dataclass_json From 4b336441d7821dbcfd7003cc0133456fde3c8946 Mon Sep 17 00:00:00 2001 From: Tamir Date: Fri, 4 Apr 2025 11:48:52 +0300 Subject: [PATCH 2/3] fix size field to correct name --- datacrunch/containers/containers.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/datacrunch/containers/containers.py b/datacrunch/containers/containers.py index 7221610..65c3d37 100644 --- a/datacrunch/containers/containers.py +++ b/datacrunch/containers/containers.py @@ -90,10 +90,11 @@ class VolumeMount: :param type: Type of volume mount :param mount_path: Path where the volume should be mounted in the container + :param size_in_mb: Size of the volume in megabytes, only used for memory volume mounts """ type: VolumeMountType mount_path: str - size_in_gb: Optional[int] = None + size_in_mb: Optional[int] = None @dataclass_json From 0ccd7918ca3d95136fcd9c1da4fbf4557005fae6 Mon Sep 17 00:00:00 2001 From: Tamir Date: Fri, 4 Apr 2025 13:36:00 +0300 Subject: [PATCH 3/3] changelog --- CHANGELOG.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index ca00f6a..d6afdb7 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -4,6 +4,8 @@ Changelog * Added environment variables to container deployment example * Updated examples image from 'fastai' to 'ubuntu-24.04-cuda-12.8-open-docker' * Consistent naming and load of credentials from env variables in examples +* Added size_in_mb parameter to VolumeMount class +* Added memory volume mount type v1.8.4 (2025-03-25) -------------------