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) ------------------- diff --git a/datacrunch/containers/containers.py b/datacrunch/containers/containers.py index ef7f890..65c3d37 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,16 +83,18 @@ class EnvVar: type: EnvVarType -@dataclass_json +@dataclass_json(undefined=Undefined.EXCLUDE) @dataclass class VolumeMount: """Volume mount configuration for containers. :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_mb: Optional[int] = None @dataclass_json