import not possible when running in docker container
See original GitHub issueHey! I’m trying to set up a docker container and use 8 bit Adam. When I’m trying to import bitsandbytes, I’m getting
2022-10-26T11:20:58.819996206Z import bitsandbytes as bnb
2022-10-26T11:20:58.820003169Z File "/root/miniconda3/lib/python3.9/site-packages/bitsandbytes/__init__.py", line 6, in <module>
2022-10-26T11:20:58.820019600Z from .autograd._functions import (
2022-10-26T11:20:58.820023698Z File "/root/miniconda3/lib/python3.9/site-packages/bitsandbytes/autograd/_functions.py", line 5, in <module>
2022-10-26T11:20:58.820060948Z import bitsandbytes.functional as F
2022-10-26T11:20:58.820067420Z File "/root/miniconda3/lib/python3.9/site-packages/bitsandbytes/functional.py", line 13, in <module>
2022-10-26T11:20:58.820089783Z from .cextension import COMPILED_WITH_CUDA, lib
2022-10-26T11:20:58.820094021Z File "/root/miniconda3/lib/python3.9/site-packages/bitsandbytes/cextension.py", line 113, in <module>
2022-10-26T11:20:58.820140619Z lib = CUDASetup.get_instance().lib
2022-10-26T11:20:58.820148213Z File "/root/miniconda3/lib/python3.9/site-packages/bitsandbytes/cextension.py", line 109, in get_instance
2022-10-26T11:20:58.820191876Z cls._instance.initialize()
2022-10-26T11:20:58.820198208Z File "/root/miniconda3/lib/python3.9/site-packages/bitsandbytes/cextension.py", line 59, in initialize
2022-10-26T11:20:58.820229417Z binary_name, cudart_path, cuda, cc, cuda_version_string = evaluate_cuda_setup()
2022-10-26T11:20:58.820236040Z ValueError: too many values to unpack (expected 5)
This happens only when I’m starting my script directly in the Dockerfile, if I instead just start the container without any CMD or ENTRYPOINT, ssh into the container and then manually start the script, it does work, but for some reason, Docker doesn’t seem to be having access to CUDA properly when starting from the Dockerfile?
I’ve traced the error down to https://github.com/TimDettmers/bitsandbytes/blob/a371be302ddbdf3f36acef1a6fe365672099c9d9/bitsandbytes/cuda_setup/main.py#L137 since the function returns here with only one value instead of the expected 5, but I haven’t had any other issues with CUDA before that, e.g. transferring models to the GPU by using .to('cuda')
I’m at a loss since I’m not too experienced with Docker and it does work when I’m starting the script manually via ssh.
Thanks in advance!
Issue Analytics
- State:
- Created a year ago
- Comments:7 (1 by maintainers)
Top GitHub Comments
using the
devel
did work for me. Also manually installing cudatoolkit with conda!Any updates? I am facing this exact issue on WSL2 with a 3090 and cuda 11.6 installed on the docker.