Skip to content
Merged
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
10 changes: 9 additions & 1 deletion chi/container.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import os
import tarfile
import time
from typing import List, Optional, Tuple
from typing import Dictionary, List, Optional, Tuple

from IPython.display import HTML, display
from packaging.version import Version
Expand Down Expand Up @@ -62,6 +62,8 @@ class Container:
id (str): The ID of the container.
created_at (str): The timestamp when the container was created.
status (str): The current status of the container.
environment (Dictionary[str, str]): A dictionary of environment variables for the container.
device_profiles (List[str]): A list of device profiles to be configured on the container.
"""

def __init__(
Expand All @@ -75,6 +77,8 @@ def __init__(
runtime: str = None,
command: List[str] = None,
workdir: str = None,
environment: Dictionary[str, str] = {},
device_profiles: List[str] = [],
):
self.name = name
self.image_ref = image_ref
Expand All @@ -88,6 +92,8 @@ def __init__(
self._status = None
self.command = command
self.workdir = workdir
self.environment = environment
self.device_profiles = device_profiles

@classmethod
def from_zun_container(cls, zun_container):
Expand Down Expand Up @@ -152,6 +158,8 @@ def submit(
start=self.start,
start_timeout=self.start_timeout,
runtime=self.runtime,
environment=self.environment,
device_profiles=self.device_profiles,
**kwargs,
)

Expand Down
Loading