fix: tools-container build failing due to pip install failure without venv
Description
Tools container build failing due to this error :
#23 [stage-0 15/15] RUN pip3 install -r requirements.txt
#23 1.380 error: externally-managed-environment
#23 1.380
#23 1.380 × This environment is externally managed
#23 1.380 ╰─>
#23 1.380 The system-wide python installation should be maintained using the system
#23 1.380 package manager (apk) only.
#23 1.380
#23 1.380 If the package in question is not packaged already (and hence installable via
#23 1.380 "apk add py3-somepackage"), please consider installing it inside a virtual
#23 1.380 environment, e.g.:
#23 1.380
#23 1.380 python3 -m venv /path/to/venv
#23 1.380 . /path/to/venv/bin/activate
#23 1.380 pip install mypackage
#23 1.380
#23 1.380 To exit the virtual environment, run:
#23 1.380
#23 1.380 deactivate
#23 1.380
#23 1.380 The virtual environment is not deleted, and can be re-entered by re-sourcing
#23 1.380 the activate file.
#23 1.380
#23 1.380 To automatically manage virtual environments, consider using pipx (from the
#23 1.380 pipx package).
#23 1.380
#23 1.380 note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.
#23 1.380 hint: See PEP 668 for the detailed specification.
#23 ERROR: process "/bin/sh -c pip3 install -r requirements.txt" did not complete successfully: exit code: 1
------
> [stage-0 15/15] RUN pip3 install -r requirements.txt:
1.380 deactivate
1.380
1.380 The virtual environment is not deleted, and can be re-entered by re-sourcing
1.380 the activate file.
1.380
1.380 To automatically manage virtual environments, consider using pipx (from the
1.380 pipx package).
1.380
1.380 note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.
1.380 hint: See PEP 668 for the detailed specification.
As suggested in the error, this MR adds the --break-system-packages
flag to docker file.
Supporting information
Link to other information about the change, such as GitLab issues, GitHub issues, forum discussions. Be sure to check they are publicly readable, or if not, repeat the information here.
Testing instructions
Steps to test the changes:
- TBD
Dependencies
List the dependencies required for this change, if any. Do not forget to link grove-template merge request here if that's affected by this change.
Screenshots
If applicable, add screenshots to help explain your feature.
Checklist
If any of the items below is not applicable, do not remove them, but put a check in it.
-
All providers include the new feature/change -
All affected providers can provision new clusters -
Unit tests are added/updated -
Documentation is added/updated -
The TOOLS_CONTAINER_IMAGE_VERSION
in ci_vars.yml is updated -
The grove-template repository is updated
Additional context
Add any other context about the merge request here.
Edited by Kaustav Banerjee