Skip to content

mlcube configure with local docker image #342

@hasan7n

Description

@hasan7n

Running mlcube configure with an MLCube that uses a local docker image that hasn't been pushed yet to the remote registry is throwing an error (and exiting with status 1). Here is the output error:

2023-08-19 01:02:07 hasan-HP-ZBook-15-G3 mlcube.config[42674] WARNING Default runner config contains parameters that are not present in the effective runner config (params=['--mount_opts']). This probably means that a new version of a runner was installed that introduced new parameters.
Error response from daemon: manifest for mlcommons/mock-model-brats:0.0.0 not found: manifest unknown: manifest unknown
2023-08-19 01:02:08 hasan-HP-ZBook-15-G3 mlcube.shell[42674] ERROR Shell.run command='docker pull mlcommons/mock-model-brats:0.0.0' status=256 exit_status=exited exit_code=1 on_error=raise
Failed to configure MLCube with error code 1.
2023-08-19 01:02:08 hasan-HP-ZBook-15-G3 mlcube.__main__[42674] ERROR ERROR:
        message: DockerRun runner failed to configure MLCube.
        description: Error occurred while pulling docker image (docker=docker, image=mlcommons/mock-model-brats:0.0.0).
        context: {'status': 'exited', 'code': 1, 'cmd': 'docker pull mlcommons/mock-model-brats:0.0.0'}
Traceback (most recent call last):
  File "/home/hasan/work/medperf_ws/mlcube/runners/mlcube_docker/mlcube_docker/docker_run.py", line 169, in configure
    Shell.run([docker, "pull", image])
  File "/home/hasan/work/medperf_ws/mlcube/mlcube/mlcube/shell.py", line 104, in run
    raise ExecutionError(
mlcube.errors.ExecutionError: Failed to execute shell command.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/hasan/work/medperf_ws/mlcube/mlcube/mlcube/__main__.py", line 258, in configure
    runner.configure()
  File "/home/hasan/work/medperf_ws/mlcube/runners/mlcube_docker/mlcube_docker/docker_run.py", line 177, in configure
    raise ExecutionError.mlcube_configure_error(
mlcube.errors.ExecutionError: DockerRun runner failed to configure MLCube. Error occurred while pulling docker image (docker=docker, image=mlcommons/mock-model-brats:0.0.0).

The reason is that MLCube tries to pull the image by default (build strategy is pull/auto).

Question: should this command instead fallback to check if the local image exists and only throw a warning instead? Perhaps when build_strategy=auto.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions