Skip to content

Commit d6f88ea

Browse files
authored
Merge pull request #34 from DataCrunch-io/feature/containers-ramdisk
Feature/containers ramdisk
2 parents 93c94d0 + 0ccd791 commit d6f88ea

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

CHANGELOG.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ Changelog
44
* Added environment variables to container deployment example
55
* Updated examples image from 'fastai' to 'ubuntu-24.04-cuda-12.8-open-docker'
66
* Consistent naming and load of credentials from env variables in examples
7+
* Added size_in_mb parameter to VolumeMount class
8+
* Added memory volume mount type
79

810
v1.8.4 (2025-03-25)
911
-------------------

datacrunch/containers/containers.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ class EnvVarType(str, Enum):
1919
class VolumeMountType(str, Enum):
2020
SCRATCH = "scratch"
2121
SECRET = "secret"
22+
MEMORY = "memory"
2223

2324

2425
class ContainerRegistryType(str, Enum):
@@ -82,16 +83,18 @@ class EnvVar:
8283
type: EnvVarType
8384

8485

85-
@dataclass_json
86+
@dataclass_json(undefined=Undefined.EXCLUDE)
8687
@dataclass
8788
class VolumeMount:
8889
"""Volume mount configuration for containers.
8990
9091
:param type: Type of volume mount
9192
:param mount_path: Path where the volume should be mounted in the container
93+
:param size_in_mb: Size of the volume in megabytes, only used for memory volume mounts
9294
"""
9395
type: VolumeMountType
9496
mount_path: str
97+
size_in_mb: Optional[int] = None
9598

9699

97100
@dataclass_json

0 commit comments

Comments
 (0)