Skip to content

Conversation

@dionhaefner
Copy link
Contributor

Relevant issue or PR

Fixes #425

Description of changes

  • Add addmeplease executable to every container that adds the current user + group to /etc/passwd and a few other system files.
  • This ensures user code can now rely on the fact that the executing OS user always has a proper uid, gid, home directory, and shell.

We achieve this by compiling a simple C binary that we can run as root with setuid even from non-privileged accounts.

Testing done

Tested on reproducer from #425, and added new e2e test on CI.

@codecov
Copy link

codecov bot commented Dec 18, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 76.81%. Comparing base (21b7351) to head (f5cc8e6).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #427      +/-   ##
==========================================
+ Coverage   76.70%   76.81%   +0.10%     
==========================================
  Files          29       29              
  Lines        3439     3442       +3     
  Branches      537      538       +1     
==========================================
+ Hits         2638     2644       +6     
+ Misses        569      567       -2     
+ Partials      232      231       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Contributor

@apaleyes apaleyes left a comment

Choose a reason for hiding this comment

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

After thinking about this for a while and reading docker/linux docs, I am happy to approve it. Still can't claim full understanding though! But at least the general idea now makes sense.

Of course it would be nice to have @xalelax see this too, as he was involved in all earlier bugs/complications with setting users inside tesseracts

Copy link
Contributor

@xalelax xalelax left a comment

Choose a reason for hiding this comment

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

I was originally puzzled by the approach, but tbh while looking for alternatives I didn't find anything better. Let's go with this

@xalelax
Copy link
Contributor

xalelax commented Dec 31, 2025

I went ahead and implemented @apaleyes 's suggestions on 8092b02; merging soon

@xalelax xalelax enabled auto-merge (squash) December 31, 2025 09:29
@xalelax xalelax merged commit a7ace4a into main Dec 31, 2025
43 checks passed
@xalelax xalelax deleted the dion/fix-user-handling branch December 31, 2025 09:40
@pasteurlabs pasteurlabs locked and limited conversation to collaborators Dec 31, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

torch.onnx.export not supported with default dynamo param

4 participants