Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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)
-------------------
Expand Down
5 changes: 4 additions & 1 deletion datacrunch/containers/containers.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ class EnvVarType(str, Enum):
class VolumeMountType(str, Enum):
SCRATCH = "scratch"
SECRET = "secret"
MEMORY = "memory"


class ContainerRegistryType(str, Enum):
Expand Down Expand Up @@ -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
Expand Down