[go: up one dir, main page]

Draft: Docker: Use site.addsitedir to append to path

Description

This should help the make the use of our Docker containers even more flexible by giving the possibility to install additional python packages without changing the container. This is done by adding /git/custom as a site directory (just like your site-packages directory) rather than just adding it to the system path. This allows to properly have packages installed in the custom directory. Then one can even use pip to install packages like pip install <package-name> --target <bind-dir>. For example one could do

pip install toptica-lasersdk --target /host/custom_dir
docker run -v /host/custom_dir:/git/custom registry.gitlab.com/atomiq-project/heros /usr/local/bin/python

Inside the container, the packages installed via pip will be available. The packages installed inside the container will, however, take precedence.

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Checklist:

  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
Edited by Thomas Niederprüm

Merge request reports

Loading