Skip to content

build_container: Allow pip to install system-wide #123

New issue

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

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

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 5, 2025

Conversation

RuoqingHe
Copy link
Member

@RuoqingHe RuoqingHe commented Mar 4, 2025

Summary of the PR

Found in https://github.com/rust-vmm/rust-vmm-container/actions/runs/13650154708/job/38156682477#step:7:2290.

We are having error: externally-managed-environment after upgrading to ubuntu:24.04. Remove EXTERNALLY-MANAGED file to allow pip to install packages system-wide.

And even if we have set -e, if pip install fails, the script goes on because we use the && operator.

Avoid this to make sure that we discover any errors with pip install.

Requirements

Before submitting your PR, please make sure you addressed the following
requirements:

  • All commits in this PR have Signed-Off-By trailers (with
    git commit -s), and the commit message has max 60 characters for the
    summary and max 75 characters for each description line.
  • All added/changed functionality has a corresponding unit/integration
    test.
  • All added/changed public-facing functionality has entries in the "Upcoming
    Release" section of CHANGELOG.md (if no such section exists, please create one).
  • Any newly added unsafe code is properly documented.

We are having `error: externally-managed-environment` after upgrading to
ubuntu:24.04. Remove `EXTERNALLY-MANAGED` file to allow pip to install
packages system-wide.

Signed-off-by: Ruoqing He <heruoqing@iscas.ac.cn>
@stefano-garzarella
Copy link
Member

@RuoqingHe LGTM, just some notes about the commit message:

build_container: Avoid pip install with &&

Using pip install with bash && operator will cause failure of pip
install to escape from set -x, while we need this failure to be caught
by set -x.

Is set -e that will exit if a command fail. I suggest something like this:

build_container: Avoid pip install with &&

Even if we have `set -e`, if `pip install` fails, the script goes on because
we use the && operator.

Avoid this to make sure that we discover any errors with `pip install`.

@RuoqingHe
Copy link
Member Author

build_container: Avoid pip install with &&

Even if we have set -e, if pip install fails, the script goes on because
we use the && operator.

Avoid this to make sure that we discover any errors with pip install.

Thanks for helping me with wording, I was struggling how to phrase this commit message 😂

Even if we have `set -e`, if `pip install` fails, the script goes on
because we use the && operator.

Avoid this to make sure that we discover any errors with `pip install`.

Signed-off-by: Ruoqing He <heruoqing@iscas.ac.cn>
Copy link
Member

@roypat roypat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah nice, I was wondering how we ended up without pytest in the container haha

@stefano-garzarella stefano-garzarella merged commit af9029e into rust-vmm:main Mar 5, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants