Can not install env properly
Hello, I am currently conducting related research and came across your repository https://github.com/blazerye/DrugAssist. The experiment looks particularly impressive. However, I encountered a failure while setting up the environment. Could you please provide a pip freeze or conda export env document?
Thank you for your attention to our work! For the pip version of the requirement file, please refer to the requirements.txt on the main page. We have tested the availability of the installation under the current file. I will send you the conda version of the requirement file (environment.yml). environment.zip
@dalecai666 I tried to use the yaml file for environment configuration, but it still didn't work. It seems to be a problem with the Cuda version. The platform I use uses Cuda12. Do you have a yaml configuration file for cuda12?
Hi @DonaldDai We have tested the yaml file under CUDA 12.4 version and were able to successfully install the required environment for the experiment and run the related code. Therefore, we do not think that the installation failure is caused by the CUDA version issue. If you can provide more details, such as a more detailed problem description, logs or screenshots, error messages, dependencies, etc., we can help you resolve it.
@dalecai666 Of course! Here is the output of nvidia-smi and python gradio_service.py
Looks like mismatched cuda versions used by bitsandbytes
===================================BUG REPORT===================================
Welcome to bitsandbytes. For bug reports, please run
python -m bitsandbytes
and submit this information together with your error trace to: https://github.com/TimDettmers/bitsandbytes/issues
================================================================================
bin /home/yahaha/dev_tools/miniconda3/envs/drugassist/lib/python3.8/site-packages/bitsandbytes/libbitsandbytes_cuda117.so
/home/yahaha/dev_tools/miniconda3/envs/drugassist/lib/python3.8/site-packages/bitsandbytes/cuda_setup/main.py:149: UserWarning: /home/yahaha/dev_tools/miniconda3/envs/drugassist did not contain ['libcudart.so', 'libcudart.so.11.0', 'libcudart.so.12.0'] as expected! Searching further paths...
warn(msg)
/home/yahaha/dev_tools/miniconda3/envs/drugassist/lib/python3.8/site-packages/bitsandbytes/cuda_setup/main.py:149: UserWarning: /usr/local/gromacs/lib:/opt/nvidia/hpc_sdk/Linux_x86_64/23.3/math_libs/lib64:/opt/nvidia/hpc_sdk/Linux_x86_64/23.3/compilers/lib:/opt/nvidia/hpc_sdk/Linux_x86_64/23.3/comm_libs/openmpi4/openmpi-4.0.5/lib:/opt/nvidia/hpc_sdk/Linux_x86_64/23.3/compilers/extras/qd/lib:/opt/nvidia/hpc_sdk/Linux_x86_64/23.3/math_libs/lib64:/opt/nvidia/hpc_sdk/Linux_x86_64/23.3/compilers/lib:/opt/nvidia/hpc_sdk/Linux_x86_64/23.3/comm_libs/openmpi4/openmpi-4.0.5/lib:/opt/nvidia/hpc_sdk/Linux_x86_64/23.3/compilers/extras/qd/lib: did not contain ['libcudart.so', 'libcudart.so.11.0', 'libcudart.so.12.0'] as expected! Searching further paths...
warn(msg)
CUDA_SETUP: WARNING! libcudart.so not found in any environmental path. Searching in backup paths...
/home/yahaha/dev_tools/miniconda3/envs/drugassist/lib/python3.8/site-packages/bitsandbytes/cuda_setup/main.py:149: UserWarning: Found duplicate ['libcudart.so', 'libcudart.so.11.0', 'libcudart.so.12.0'] files: {PosixPath('/usr/local/cuda/lib64/libcudart.so'), PosixPath('/usr/local/cuda/lib64/libcudart.so.11.0')}.. We'll flip a coin and try one of these, in order to fail forward.
Either way, this might cause trouble in the future:
If you get `CUDA error: invalid device function` errors, the above might be the cause and the solution is to make sure only one ['libcudart.so', 'libcudart.so.11.0', 'libcudart.so.12.0'] in the paths that we search based on your env.
warn(msg)
CUDA SETUP: CUDA runtime path found: /usr/local/cuda/lib64/libcudart.so
CUDA SETUP: Highest compute capability among GPUs detected: 8.0
CUDA SETUP: Detected CUDA version 117
CUDA SETUP: Loading binary /home/yahaha/dev_tools/miniconda3/envs/drugassist/lib/python3.8/site-packages/bitsandbytes/libbitsandbytes_cuda117.so...
Setting ds_accelerator to cuda (auto detect)
USE_MEM_EFF_ATTENTION: True
STORE_KV_BEFORE_ROPE: False
Apply NTK scaling with ALPHA=1.0
before load token
/home/yahaha/dev_tools/miniconda3/envs/drugassist/lib/python3.8/site-packages/transformers/tokenization_utils_base.py:1743: FutureWarning: Calling LlamaTokenizer.from_pretrained() with the path to a single file or url is deprecated and won't be possible anymore in v5. Use a model identifier or the path to a directory instead.
warnings.warn(
You are using the legacy behaviour of the <class 'transformers.models.llama.tokenization_llama.LlamaTokenizer'>. This means that tokens that come after special tokens will not be properly handled. We recommend you to read the related pull request available at https://github.com/huggingface/transformers/pull/24565
python: src/../third_party/protobuf-lite/google/protobuf/stubs/stringpiece.h:229: google::protobuf::StringPiece::StringPiece(const char*, google::protobuf::stringpiece_ssize_type): Assertion `len >= 0' failed.
Aborted
Hi @DonaldDai , we have tested on a Linux server with the same CUDA version (12.4) as yours, and after configuring the environment with the YAML file we provided earlier, the gradio_service.py can run normally. Therefore, we don't think it's a problem with the CUDA version. From the screenshot you provided, we found that the error comes from the protobuf library. We suggest doing the following checks to troubleshoot the issue:
- Check the version of protobuf again, and make sure there are no multiple versions of Protocol Buffers libraries in the environment, which may cause linking to the wrong version.
- Check the local GCC version. If your GCC version is not compatible with the requirements of the Protobuf library, it may cause compilation or runtime errors. Please refer to the official Protobuf documentation to ensure your GCC version meets its requirements.
- If you are using a third-party library, the library itself may contain bugs. We noticed that in your screenshot, the error message contains "/third_party/protobuf-lite/", so we suspect you might be using a third-party library. Our corresponding path is ./anaconda3/include/google/protobuf/stubs/stringpiece.h, so it's possible that we are using different protobuf libraries.