File tree Expand file tree Collapse file tree 2 files changed +11
-12
lines changed Expand file tree Collapse file tree 2 files changed +11
-12
lines changed Original file line number Diff line number Diff line change @@ -249,11 +249,11 @@ def create_container(
249
249
Exception: For other general errors.
250
250
251
251
"""
252
- # try:
253
- # # Pull the image if it doesn't already exist
254
- # client.images.pull(image_name)
255
- # except docker.errors.APIError as e:
256
- # raise docker.errors.APIError(f"Error pulling image: {str(e)}")
252
+ try :
253
+ # Pull the image if it doesn't already exist
254
+ client .images .pull (image_name )
255
+ except docker .errors .APIError as e :
256
+ raise docker .errors .APIError (f"Error pulling image: { str (e )} " )
257
257
258
258
if not logger :
259
259
# if logger is None, print to stdout
Original file line number Diff line number Diff line change 1
- import hashlib
2
-
3
1
from dataclasses import dataclass
4
2
from typing import Union , cast , Optional
5
3
@@ -48,12 +46,13 @@ def repo_image_key(self) -> str:
48
46
49
47
Note that old images are not automatically deleted, so consider cleaning up old images periodically.
50
48
"""
51
- hash_object = hashlib .sha256 ()
52
- hash_object .update (str (self .setup_script ).encode ("utf-8" ))
53
- hash_value = hash_object .hexdigest ()
54
- val = hash_value [:22 ] # 22 characters is still very likely to be unique
49
+ # hash_object = hashlib.sha256()
50
+ # hash_object.update(str(self.setup_script).encode("utf-8"))
51
+ # hash_value = hash_object.hexdigest()
52
+ # val = hash_value[:22] # 22 characters is still very likely to be unique
55
53
repo = self .repo .split ("/" )[- 1 ]
56
- return f"commit0.repo.{ repo } .{ val } :latest" .lower ()
54
+ # return f"commit0.repo.{repo}.{val}:latest".lower()
55
+ return f"wentingzhao/{ repo } :latest" .lower ()
57
56
58
57
def get_container_name (self , run_id : Optional [str ] = None ) -> str :
59
58
repo = self .repo .split ("/" )[- 1 ]
You can’t perform that action at this time.
0 commit comments