Skip to content

Commit 48ed427

Browse files
committed
no longer require to build
1 parent c24bb2b commit 48ed427

File tree

2 files changed

+11
-12
lines changed

2 files changed

+11
-12
lines changed

commit0/harness/docker_utils.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -249,11 +249,11 @@ def create_container(
249249
Exception: For other general errors.
250250
251251
"""
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)}")
257257

258258
if not logger:
259259
# if logger is None, print to stdout

commit0/harness/spec.py

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import hashlib
2-
31
from dataclasses import dataclass
42
from typing import Union, cast, Optional
53

@@ -48,12 +46,13 @@ def repo_image_key(self) -> str:
4846
4947
Note that old images are not automatically deleted, so consider cleaning up old images periodically.
5048
"""
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
5553
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()
5756

5857
def get_container_name(self, run_id: Optional[str] = None) -> str:
5958
repo = self.repo.split("/")[-1]

0 commit comments

Comments
 (0)