Skip to content

Commit

Permalink
v2.0.30
Browse files Browse the repository at this point in the history
  • Loading branch information
ashpreetbedi committed Nov 7, 2023
1 parent b70cdc6 commit 26264d7
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
12 changes: 11 additions & 1 deletion phi/docker/resource/container.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,17 @@ def run_container(self, docker_client: DockerApiClient) -> Optional[Any]:
try:
_api_client: DockerClient = docker_client.api_client
with Progress(transient=True) as progress:
task = progress.add_task("Downloading Image", total=None) # noqa: F841
if self.force:
try:
pull_image_task = progress.add_task("Downloading Image", total=None) # noqa: F841
_api_client.images.pull(self.image, platform=self.platform)
progress.update(pull_image_task, completed=True)
except Exception as pull_exc:
logger.warning(f"Could not pull image: {self.image}: {pull_exc}")
if self.force:
run_container_task = progress.add_task("Running Container", total=None) # noqa: F841
else:
run_container_task = progress.add_task("Downloading Image", total=None) # noqa: F841
container_object = _api_client.containers.run(
name=self.name,
image=self.image,
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "phidata"
version = "2.0.29"
version = "2.0.30"
description = "AI Toolkit for Engineers"
requires-python = ">=3.7"
readme = "README.md"
Expand Down

0 comments on commit 26264d7

Please sign in to comment.