Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Checking image lean version not pulling images first #502

Closed
Martin-Molinero opened this issue Sep 20, 2024 · 0 comments · Fixed by #503
Closed

Checking image lean version not pulling images first #502

Martin-Molinero opened this issue Sep 20, 2024 · 0 comments · Fixed by #503
Assignees
Labels
bug Something isn't working

Comments

@Martin-Molinero
Copy link
Member

Martin-Molinero commented Sep 20, 2024

When we check for the lean engine image version it might not be there yet. Believe start happening after #485. Can reproduce with docker tag quantconnect/lean leanlatest and docker rmi quantconnect/lean

Solution: we should normalize accessing images passing through a pull if required/wanted

Traceback (most recent call last):
  File "C:\Python311\Lib\site-packages\lean\main.py", line 94, in main
    lean.main(standalone_mode=False)
  File "C:\Python311\Lib\site-packages\click\core.py", line 1078, in main
    rv = self.invoke(ctx)
         ^^^^^^^^^^^^^^^^
  File "C:\Python311\Lib\site-packages\click\core.py", line 1688, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Python311\Lib\site-packages\click\core.py", line 1688, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Python311\Lib\site-packages\lean\click.py", line 231, in invoke
    result = super().invoke(ctx)
             ^^^^^^^^^^^^^^^^^^^
  File "C:\Python311\Lib\site-packages\click\core.py", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Python311\Lib\site-packages\click\core.py", line 783, in invoke
    return __callback(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Python311\Lib\site-packages\lean\commands\live\deploy.py", line 280, in deploy
    container_module_version = container.docker_manager.get_image_label(engine_image,
                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Python311\Lib\site-packages\lean\components\docker\docker_manager.py", line 42, in get_image_label
    docker_image = self._get_docker_client().images.get(str(image))
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Python311\Lib\site-packages\docker\models\images.py", line 333, in get
    return self.prepare_model(self.client.api.inspect_image(name))
                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Python311\Lib\site-packages\docker\utils\decorators.py", line 19, in wrapped
    return f(self, resource_id, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Python311\Lib\site-packages\docker\api\image.py", line 251, in inspect_image
    return self._result(
           ^^^^^^^^^^^^^
  File "C:\Python311\Lib\site-packages\docker\api\client.py", line 271, in _result
    self._raise_for_status(response)
  File "C:\Python311\Lib\site-packages\docker\api\client.py", line 267, in _raise_for_status
    raise create_api_error_from_http_exception(e) from e
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Python311\Lib\site-packages\docker\errors.py", line 39, in create_api_error_from_http_exception
    raise cls(e, response=response, explanation=explanation) from e
docker.errors.ImageNotFound: 404 Client Error for http+docker://localnpipe/v1.47/images/quantconnect/lean:latest/json: Not Found ("No such image: quantconnect/lean:latest")
Error: 404 Client Error for http+docker://localnpipe/v1.47/images/quantconnect/lean:latest/json: Not Found ("No such image: quantconnect/lean:latest")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants