Skip to content

Commit

Permalink
feat(container): Add requirements property in case specified (#142)
Browse files Browse the repository at this point in the history
  • Loading branch information
kakkoyun authored Jun 5, 2024
1 parent 0e27df9 commit 21fbea8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/isolate/backends/container.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ class ContainerizedPythonEnvironment(BaseEnvironment[Path]):

image: dict[str, Any] = field(default_factory=dict)
python_version: str | None = None
requirements: list[str] = field(default_factory=list)
tags: list[str] = field(default_factory=list)

@classmethod
Expand All @@ -34,7 +35,7 @@ def key(self) -> str:
# dockerfile_str is always there, but the validation is handled by the
# controller.
dockerfile_str = self.image.get("dockerfile_str", "")
return sha256_digest_of(dockerfile_str, *sorted(self.tags))
return sha256_digest_of(dockerfile_str, *self.requirements, *sorted(self.tags))

def create(self, *, force: bool = False) -> Path:
return Path(sys.exec_prefix)
Expand Down

0 comments on commit 21fbea8

Please sign in to comment.