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

fix: use root for python installs #49136

Merged
merged 14 commits into from
Dec 12, 2024
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,8 @@ async def with_installed_python_package(
has_requirements_txt = await check_path_in_workdir(container, "requirements.txt")
has_pyproject_toml = await check_path_in_workdir(container, "pyproject.toml")

container = container.with_user("root")
# All of these will require root access to install dependencies
if has_pyproject_toml:
container = with_poetry_cache(container, context.dagger_client)
container = _install_python_dependencies_from_poetry(container, additional_dependency_groups, install_root_package)
Expand All @@ -225,6 +227,8 @@ async def with_installed_python_package(
container = with_pip_cache(container, context.dagger_client)
container = _install_python_dependencies_from_requirements_txt(container)

container = container.with_user(user)

return container


Expand Down
Loading