Skip to content
New issue

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

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

Already on GitHub? # to your account

Revert container updates in 5f3c041 #22

Merged
merged 3 commits into from
Nov 15, 2022

Conversation

makubacki
Copy link
Member

@makubacki makubacki commented Nov 15, 2022

Moves pip installation behavior back to what was done before
5f3c041. After analyzing several options, including using virtual
environments, this is the path that most consistently and simply
works for container and non-container builds.

It could potentially be built upon in the future, but it gets all of
the builds functional for now.

Resolves the following warning currently issued by Linux build
agents since 5f3c041 was committed:

"WARNING: Running pip as the 'root' user can result in broken
permissions and conflicting behaviour with the system package
manager.

It is recommended to use a virtual environment instead:
https://pip.pypa.io/warnings/venv"

Signed-off-by: Michael Kubacki michael.kubacki@microsoft.com

Sets up a virtual environment on Linux agents and drops installing
pip modules as root.

Resolves the following warning issued by Linux build agents since
5f3c041 was committed:

"WARNING: Running pip as the 'root' user can result in broken
permissions and conflicting behaviour with the system package
manager.

It is recommended to use a virtual environment instead:
https://pip.pypa.io/warnings/venv"

Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
@makubacki
Copy link
Member Author

Note: I chose not to use a virtual environment on Windows because there's some known caveats there, example: https://faun.pub/azure-pipelines-and-python-virtual-environments-fdc1089656db

And it's not an issue on Windows agents at the moment.

Moves pip installation behavior back to what was done before
5f3c041. After analyzing several options, this is the path that
most consistently and simply works for container and non-container
builds.
@makubacki makubacki changed the title SetupPythonPreReqs.yml: Use virtual env on Linux Revert container updates in 5f3c041 Nov 15, 2022
@makubacki makubacki merged commit 28f5eaa into microsoft:main Nov 15, 2022
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants