Skip to content
This repository has been archived by the owner on Sep 13, 2023. It is now read-only.

Conflicting package versions break docker build #637

Open
aguschin opened this issue Mar 13, 2023 · 0 comments
Open

Conflicting package versions break docker build #637

aguschin opened this issue Mar 13, 2023 · 0 comments
Labels
bug Something isn't working build Exporting models (building model packages) requirements Finding requirements and dependencies needed to properly serialize objects

Comments

@aguschin
Copy link
Contributor

aguschin commented Mar 13, 2023

This should happen for any mlem build docker, but I got this for flyio deploy:

#7 19.23 INFO: pip is looking at multiple versions of numpy to determine which version is compatible with other requirements. This could take a while.
#7 19.23 ERROR: Cannot install -r requirements.txt (line 3) and numpy==1.21.6 because these package versions have conflicting dependencies.
#7 19.23
#7 19.23 The conflict is caused by:
#7 19.23     The user requested numpy==1.21.6
#7 19.23     tensorflow 2.6.4 depends on numpy~=1.19.2
#7 19.23
#7 19.23 To fix this you could try to:
#7 19.23 1. loosen the range of package versions you've specified
#7 19.23 2. remove package versions to allow pip attempt to solve the dependency conflict
#7 19.23
#7 19.23 ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/user_guide/#fixing-conflicting-dependencies
#7 19.35 WARNING: You are using pip version 21.1.3; however, version 23.0.1 is available.
#7 19.35 You should consider upgrading via the '/usr/local/bin/python -m pip install --upgrade pip' command.
#7 ERROR: executor failed running [/bin/sh -c pip install -r requirements.txt && pip cache purge]: exit code: 1
------
 > [4/6] RUN pip install -r requirements.txt && pip cache purge:
#7 19.23     The user requested numpy==1.21.6
#7 19.23     tensorflow 2.6.4 depends on numpy~=1.19.2
#7 19.23
#7 19.23 To fix this you could try to:
#7 19.23 1. loosen the range of package versions you've specified
#7 19.23 2. remove package versions to allow pip attempt to solve the dependency conflict
#7 19.23
#7 19.23 ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/user_guide/#fixing-conflicting-dependencies
#7 19.35 WARNING: You are using pip version 21.1.3; however, version 23.0.1 is available.
#7 19.35 You should consider upgrading via the '/usr/local/bin/python -m pip install --upgrade pip' command.
------
Error failed to fetch an image or build from source: error building: executor failed running [/bin/sh -c pip install -r requirements.txt && pip cache purge]: exit code: 1

Which is because:

requirements:
- module: numpy
  version: 1.21.6
- module: keras
  version: 2.6.0
- module: tensorflow
  version: 2.6.4

Suggestion: fall back to installing incompatible versions, since in this case it should be expected and desired. (Question: how to allow installing exact packages/versions from .mlem, but keep version resolution mechanism in place for other packages/versions?)

model to reproduce with
price_keras_preprocess_broken.zip

@aguschin aguschin added build Exporting models (building model packages) requirements Finding requirements and dependencies needed to properly serialize objects bug Something isn't working labels Mar 13, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working build Exporting models (building model packages) requirements Finding requirements and dependencies needed to properly serialize objects
Projects
None yet
Development

No branches or pull requests

1 participant