mirror of
https://github.com/netblue30/firejail.git
synced 2026-05-15 14:16:14 -06:00
[GH-ISSUE #5623] Torch cuda not working with firejail --noprofile #3050
Labels
No labels
LTS merge
LTS merge
bug
bug
converted-to-discussion
doc-todo
documentation
duplicate
enhancement
file-transfer
firecfg
firejail-in-firejail
firetools
graphics
help wanted
information_old
installation
invalid
modif
moved
needinfo
networking
notabug
notourbug
old-version
overlayfs
packaging
profile-request
pull-request
question
question_old
removal
runtime-permissions
sandbox-ipc
security
stale
wiki
wiki
wontfix
wordpress
workaround
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/firejail#3050
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @achsvg on GitHub (Jan 27, 2023).
Original GitHub issue: https://github.com/netblue30/firejail/issues/5623
Description
I have installed torch 1.13.1 with cuda support on a GPU machine. The following command fails:
Whereas running it outside of firejail gives:
Strange thing is that once it has ran outside of firejail once, it will succeed in firejail thereafter. I'm guessing it has to do with lazy initialization of CUDA in Torch. Is there any configuration I can make to make it work in firejail without priorly having to run it outside ?
Steps to Reproduce
All described above
Expected behavior
firejail --noprofile -- python -c "import torch; print(torch.cuda.is_available())"should returnTrueActual behavior
It returns
Falsewith error messageBehavior without a profile
as described in the description.
Additional context
Environment
Checklist
/usr/bin/vlc) "fixes" it).https://github.com/netblue30/firejail/issues/1139)browser-allow-drm yes/browser-disable-u2f noinfirejail.configto allow DRM/U2F in browsers.--profile=PROFILENAMEto set the right profile. (Only relevant for AppImages)Log
Output of
LC_ALL=C firejail /path/to/programOutput of
LC_ALL=C firejail --debug /path/to/program@kmk3 commented on GitHub (Jan 27, 2023):
@achsvg on Jan 27:
Interesting; does it work with
firejail --profile=noprofile?noprofile.profile removes even more restrictions than using
--noprofile.Note that we do not maintain that firejail version:
See also:
What happens with the latest released firejail version?
@achsvg commented on GitHub (Jan 27, 2023):
Some options in
noprofileare not supported by the version I'm using but after removing them it works! So I managed to bisect which option affects the CUDA loading. And it looks like whenallow-debuggersis in the profile it works. Not sure why CUDA would need this though...I'm not able to test the latest released version yet but will try later.
@rusty-snake commented on GitHub (Jan 27, 2023):
If I have to guess
c2b6b6b1a3/src/firejail/fs.c (L774-L780)