Skip to content

Conversation

@jb3
Copy link
Member

@jb3 jb3 commented Jan 10, 2026

After #248 the new :latest image (as opposed to the :latest-pydis) image was in a broken state as the default Python symlinked to /usr/local/bin which was then not mounted in nsjail.

This PR fixes that by mounting the system Python interpreter to the container and mounting /usr/local/lib (which in sneakbox images still only contains Python libraries and system-level dependencies).

This will of course change the :latest-pydis image in that the system Python will now be available in the jail (whereas before it was only the specific versions we were adding), though I think this poses little problem for us as it's not going to be called by any of the calls from python-discord/bot and doesn't give any additional powers or capabilities. We could toggle this mounting off with a feature flag/config option somewhere but I think the gain is so minimal it's not worth it.

The custom user base still stores additional dependencies that users may wish to add and is still looked at by the system Python when an evaluation is triggered.

Closes #255

@jb3 jb3 requested review from Den4200 and MarkKoz as code owners January 10, 2026 17:01
@coveralls
Copy link

Coverage Status

coverage: 88.345%. remained the same
when pulling ffd62b2 on jb3/mount-system-python
into 866e9b9 on main.

@jb3 jb3 merged commit f420f0b into main Jan 10, 2026
7 checks passed
@jb3 jb3 deleted the jb3/mount-system-python branch January 10, 2026 17:57
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.

Fails to run from (latest?) docker image: return code 255

4 participants