Skip to content

Commit

Permalink
Progress fix and setuptools version change (#91)
Browse files Browse the repository at this point in the history
* change setuptools version when installing requirements

* pull progress fix
  • Loading branch information
NikolaiPetukhov authored Nov 1, 2024
1 parent 185682a commit d5fc46e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
11 changes: 7 additions & 4 deletions agent/worker/docker_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,9 @@ def _docker_pull(docker_api, docker_image_name, logger, raise_exception=True):
registry = resolve_registry(docker_image_name)
auth = _registry_auth_from_env(registry)
for i in range(0, PULL_RETRIES + 1):
retry_str = f" (retry {i}/{PULL_RETRIES})" if i > 0 else ""
progress_dummy = Progress(
"Pulling image..." + f" (retry {i}/{PULL_RETRIES})" if i > 0 else "",
"Pulling image..." + retry_str,
1,
ext_logger=logger,
)
Expand Down Expand Up @@ -183,19 +184,21 @@ def _docker_pull_progress(docker_api, docker_image_name, logger, raise_exception
loaded = set()
pulled = set()

retry_str = f" (retry {i}/{PULL_RETRIES})" if i > 0 else ""

progress_full = Progress(
"Preparing dockerimage" + f" (retry {i}/{PULL_RETRIES})" if i > 0 else "",
"Preparing dockerimage" + retry_str,
1,
ext_logger=logger,
)
progres_ext = Progress(
"Extracting layers" + f" (retry {i}/{PULL_RETRIES})" if i > 0 else "",
"Extracting layers" + retry_str,
1,
is_size=True,
ext_logger=logger,
)
progress_load = Progress(
"Downloading layers" + f" (retry {i}/{PULL_RETRIES})" if i > 0 else "",
"Downloading layers" + retry_str,
1,
is_size=True,
ext_logger=logger,
Expand Down
2 changes: 1 addition & 1 deletion agent/worker/task_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -648,7 +648,7 @@ def install_pip_requirements(self, container_id=None):
)
progress_dummy.iter_done_report()

command = "pip3 install --disable-pip-version-check --upgrade setuptools==70.3.0"
command = "pip3 install --disable-pip-version-check --upgrade setuptools==69.0.0"
self.logger.info(f"PIP command: {command}")
self._exec_command(command, add_envs=self.main_step_envs(), container_id=container_id)
self.process_logs()
Expand Down

0 comments on commit d5fc46e

Please sign in to comment.