nebari-dev / nebari-docker-images

📦 Ready to use Docker images maintained by the Nebari team
BSD 3-Clause "New" or "Revised" License
6 stars 12 forks source link

[BUG] - pip installs overwrite and break conda environments #173

Open krassowski opened 1 month ago

krassowski commented 1 month ago

Describe the bug

Many dependencies, including jhub-apps are installed with pip. This means that the dependencies previously installed by conda are not respected. For example:

jupyter-server-proxy >=4.2.0 depends on simpervisor >=1, but an older version gets installed because jhub-apps depends on jhsingle-native-proxy which depends on simpervisor=0.4 (jhsingle-native-proxy receives only minimal maintenance)

#27 168.8   Attempting uninstall: simpervisor
#27 168.8     Found existing installation: simpervisor 1.0.0
#27 168.8     Uninstalling simpervisor-1.0.0:
#27 168.8       Successfully uninstalled simpervisor-1.0.0
#27 168.8   Attempting uninstall: pydantic-core
#27 168.8     Found existing installation: pydantic_core 2.18.1
#27 168.8     Uninstalling pydantic_core-2.18.1:
#27 168.8       Successfully uninstalled pydantic_core-2.18.1
#27 168.8   Attempting uninstall: bokeh
#27 168.8     Found existing installation: bokeh 3.5.1
#27 168.8     Uninstalling bokeh-3.5.1:
#27 168.8       Successfully uninstalled bokeh-3.5.1

https://github.com/nebari-dev/nebari-docker-images/blob/a64dd61d886f3168d4e34a8c567e1208b5fe357e/jupyterlab/environment.yaml#L59-L64

https://github.com/nebari-dev/nebari-docker-images/blob/a64dd61d886f3168d4e34a8c567e1208b5fe357e/jupyterlab/environment.yaml#L14

Expected behavior

How to Reproduce the problem?

See https://github.com/nebari-dev/nebari-docker-images/actions/runs/10113499250/job/27970005840#step:9:4386

Command output

No response

Versions and dependencies used.

No response

Anything else?

Context: for https://github.com/nebari-dev/nebari/issues/2514 I needed to install a development version of jupyter-server-proxy but when I moved it from conda group to pip group the build failed. See

#37 256.0 INFO: pip is looking at multiple versions of jupyter-server-proxy to determine which version is compatible with other requirements. This could take a while.
#37 256.0 
#37 256.0 The conflict is caused by:
#37 256.0     jhsingle-native-proxy 0.8.2 depends on simpervisor~=0.4
#37 256.0     jupyter-server-proxy 4.3.1.post0.dev0 depends on simpervisor>=1.0.0
#37 256.0 
#37 256.0 To fix this you could try to:
#37 256.0 1. loosen the range of package versions you've specified
#37 256.0 2. remove package versions to allow pip attempt to solve the dependency conflict

https://github.com/nebari-dev/nebari-docker-images/actions/runs/10125975864/job/28002079311

Adam-D-Lewis commented 1 month ago

Thanks for reporting @krassowski. Adding pip check to the CICD seems like a good step.