Skip to content

Conversation

oOraph
Copy link
Contributor

@oOraph oOraph commented Oct 28, 2024

No description provided.

Signed-off-by: Raphael Glon <oOraph@users.noreply.github.com>
@oOraph oOraph force-pushed the dev/sandbox_and_cuda branch from c1ded91 to 7ef9f4c Compare October 28, 2024 16:57
@oOraph
Copy link
Contributor Author

oOraph commented Oct 28, 2024

Side note: I may be mistaken but should there be some other issues, only blocking connect syscalls should actually be enough to prevent users from uploading/downloading stuff to/from the internet

@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

@oOraph
Copy link
Contributor Author

oOraph commented Oct 28, 2024

reproduce:

# cat reproduce.py 
import torch
print(torch.cuda.is_available())

call strace on it we can see the following syscalls

socket(AF_UNIX, SOCK_SEQPACKET|SOCK_CLOEXEC, 0) = 9
unlink("")                              = -1 ENOENT (No such file or directory)
bind(9, {sa_family=AF_UNIX, sun_path=@"cuda-uvmfd-4026533300-1236\0"}, 30) = 0
listen(9, 128)   

before:

/app/env/lib/python3.10/site-packages/torch/cuda/__init__.py:128: UserWarning: CUDA initialization: Unexpected error from cudaGetDeviceCount(). Did you run some cuda functions before calling NumCudaDevices() that might have already set an error? Error 304: OS call failed or operation not supported on this OS (Triggered internally at /opt/conda/conda-bld/pytorch_1720538459595/work/c10/cuda/CUDAFunctions.cpp:108.)
  return torch._C._cuda_getDeviceCount() > 0
False

after:

True

@abhishekkrthakur abhishekkrthakur merged commit 447fff1 into main Oct 28, 2024
3 checks passed
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