Skip to content
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

Remove Unnecessary --privileged Flag While Keeping It for WSL Users #12920

Merged
merged 1 commit into from
Mar 3, 2025

Conversation

liu-shaojun
Copy link
Contributor

Description

According to the issue: #12792, we need to remove --privileged whenever possible.

Through testing, we found that when launching the serving-xpu image on Linux, using --device=/dev/dri --group-add video can replace --device=/dev/dri --privileged. By adding the container user to the video group, it can access the /dev/dri device. Both offline inference and benchmarking work fine under this configuration.

However, on WSL + Docker, --privileged is still required; otherwise, the GPU cannot be accessed.

1. Why the change?

  • Removed unnecessary --privileged usage.
  • Retained --privileged for Windows WSL users, as it is still required in that case.

2. User API changes

3. Summary of the change

4. How to test?

  • N/A
  • Unit test: Please manually trigger the PR Validation here by inputting the PR number (e.g., 1234). And paste your action link here once it has been successfully finished.
  • Application test
  • Document test
  • ...

5. New dependencies

  • New Python dependencies
    - Dependency1
    - Dependency2
    - ...
  • New Java/Scala dependencies and their license
    - Dependency1 and license1
    - Dependency2 and license2
    - ...

Copy link
Collaborator

@ACupofAir ACupofAir left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@glorysdj glorysdj left a comment

Choose a reason for hiding this comment

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

LGTM

@liu-shaojun liu-shaojun merged commit f81d89d into intel:main Mar 3, 2025
1 check passed
@liu-shaojun liu-shaojun deleted the dev-security branch March 3, 2025 03:11
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