Skip to content

Commit d147dd4

Browse files
committed
small bug with prev commit
1 parent 8eae038 commit d147dd4

2 files changed

Lines changed: 6 additions & 5 deletions

File tree

src/datasmith/agents/context_synthesis.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@
99
from datetime import datetime, timezone
1010
from pathlib import Path
1111

12-
import docker
1312
import dspy
14-
from docker.errors import APIError, ImageNotFound, NotFound
1513

14+
import docker
1615
from datasmith.agents.tool_executor import ContainerToolExecutor
1716
from datasmith.docker.context import BuildResult, ContextRegistry, DockerContext
1817
from datasmith.docker.orchestrator import gen_run_labels
1918
from datasmith.docker.validation import Task
19+
from docker.errors import APIError, ImageNotFound, NotFound
2020

2121
logger = logging.getLogger(__name__)
2222

@@ -503,7 +503,7 @@ def agent_build_and_validate( # noqa: C901
503503
timeout_s=args.build_timeout,
504504
tail_chars=args.tail_chars,
505505
probe=True,
506-
pull=True,
506+
pull=False,
507507
force=False, # don't rebuild if already present
508508
run_labels=run_labels,
509509
)

src/datasmith/docker/context.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,9 @@
1616
from typing import Any, ClassVar
1717

1818
import docker
19-
from docker.errors import APIError, DockerException, ImageNotFound
20-
2119
from datasmith.execution.utils import _get_commit_info
2220
from datasmith.logging_config import get_logger
21+
from docker.errors import APIError, DockerException, ImageNotFound
2322

2423
logger = get_logger("docker.context")
2524

@@ -226,6 +225,7 @@ def build_container(
226225
if not image_exists:
227226
cache_from = None
228227
if base_image := os.environ.get("DOCKER_CACHE_FROM", None):
228+
logger.info("Using DOCKER_CACHE_FROM='%s' for build cache.", base_image)
229229
build_args = {**build_args, "BASE_IMAGE": base_image}
230230
cache_from = [base_image]
231231

@@ -305,6 +305,7 @@ def build_container_streaming( # noqa: C901
305305

306306
cache_from = None
307307
if base_image := os.environ.get("DOCKER_CACHE_FROM", None):
308+
logger.info("Using DOCKER_CACHE_FROM='%s' for build cache.", base_image)
308309
build_args = {**build_args, "BASE_IMAGE": base_image}
309310
cache_from = [base_image]
310311

0 commit comments

Comments
 (0)