Skip to content

Commit

Permalink
Merge pull request #164 from TaekyungHeo/bugfix-enroot-missing
Browse files Browse the repository at this point in the history
Defer docker image URL accessibility check to srun when not caching locally
  • Loading branch information
srinivas212 authored Aug 2, 2024
2 parents 4855036 + aa79e3e commit 1951994
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions src/cloudai/util/docker_image_cache_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,16 +160,9 @@ def check_docker_image_exists(
f"cache_docker_images_locally={self.cache_docker_images_locally}"
)

# If not caching locally, check URL accessibility
# If not caching locally, return True. Defer checking URL accessibility to srun.
if not self.cache_docker_images_locally:
accessibility_check = self._check_docker_image_accessibility(docker_image_url)
if accessibility_check.success:
return DockerImageCacheResult(True, docker_image_url, accessibility_check.message)
logging.error(
f"Accessibility check failed for Docker image URL: {docker_image_url}. "
f"Error: {accessibility_check.message}"
)
return DockerImageCacheResult(False, "", accessibility_check.message)
return DockerImageCacheResult(True, docker_image_url, "")

# Check if docker_image_url is a file path and exists
if os.path.isfile(docker_image_url) and os.path.exists(docker_image_url):
Expand Down

0 comments on commit 1951994

Please sign in to comment.