Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Local CUDA installation not being detected #2428

Open
1 task done
jobs-git opened this issue Jan 28, 2025 · 4 comments
Open
1 task done

Local CUDA installation not being detected #2428

jobs-git opened this issue Jan 28, 2025 · 4 comments
Labels

Comments

@jobs-git
Copy link

jobs-git commented Jan 28, 2025

Conda-forge documentation

  • I could not solve my problem using the conda-forge documentation.

Installed packages

conda install tensorflow

Environment info

active environment : base                                                                                                                                                                                                                              
    active env location : /root/work/apps/miniforge3                                                                                                                                                                                                        
            shell level : 1                                                                                                                                                                                                                                 
       user config file : /root/.condarc                                                                                                                                                                                                                    
 populated config files : /root/work/apps/miniforge3/.condarc                                                                                                                                                                                               
                          /root/.condarc                                                                                                                                                                                                                    
          conda version : 24.11.3                                                                                                                                                                                                                           
    conda-build version : not installed                                                                                                                                                                                                                     
         python version : 3.12.8.final.0                                                                                                                                                                                                                    
                 solver : libmamba (default)                                                                                                                                                                                                                
       virtual packages : __archspec=1=zen4                                                                                                                                                                                                                 
                          __conda=24.11.3=0                                                                                                                                                                                                                 
                          __cuda=12.4=0                                                                                                                                                                                                                     
                          __glibc=2.35=0                                                                                                                                                                                                                    
                          __linux=6.8.0=0                                                                                                                                                                                                                   
                          __unix=0=0                                                                                                                                                                                                                        
       base environment : /root/work/apps/miniforge3  (writable)                                                                                                                                                                                            
      conda av data dir : /root/work/apps/miniforge3/etc/conda                                                                                                                                                                                              
  conda av metadata url : None                                                                                                                                                                                                                              
           channel URLs : https://conda.anaconda.org/conda-forge/linux-64                                                                                                                                                                                   
                          https://conda.anaconda.org/conda-forge/noarch                                                                                                                                                                                     
          package cache : /root/work/apps/miniforge3/pkgs                                                                                                                                                                                                   
                          /root/.conda/pkgs                                                                                                                                                                                                                 
       envs directories : /root/work/apps/miniforge3/envs                                                                                                                                                                                                   
                          /root/.conda/envs                                                                                                                                                                                                                 
               platform : linux-64
             user-agent : conda/24.11.3 requests/2.32.3 CPython/3.12.8 Linux/6.8.0-51-generic ubuntu/22.04.4 glibc/2.35 solver/libmamba conda-libmamba-solver/24.9.0 libmambapy/1.5.11
                UID:GID : 0:0
             netrc file : None
           offline mode : False

Issue

Installing tensorflow package results to conda pulling the same cuda version as that of the system install. It appears that conda is not detecting it and resulting to duplication.

note that paths have also been exported to no avail

export CUDA_HOME=/usr/local/cuda
export LD_LIBRARY_PATH=$CUDA_HOME/lib64:$LD_LIBRARY_PATH
export PATH=$CUDA_HOME/bin:$PATH

however normal pip install does not attempt to reinstall cuda toolkit and detects system cuda, so clearly this is a conda-forge issue not resolving library requirements.

@jobs-git jobs-git added the bug label Jan 28, 2025
@jakirkham jakirkham marked this as a duplicate of #2427 Jan 28, 2025
@jakirkham
Copy link
Member

This is expected behavior. Conda ships the entire CUDA Toolkit as Conda packages

@jobs-git
Copy link
Author

jobs-git commented Jan 28, 2025

This is expected behavior. Conda ships the entire CUDA Toolkit as Conda packages

pip does not have this issue as:

  1. pip does not force to install its own cuda toolkit
  2. the installed package detected and utilized the system installed cuda libraries like its plug and play

@jaimergp
Copy link
Member

The point to understand is that "detecting the system CUDA" is not design goal of how CUDA is distributed in conda-forge. It's not that conda can't see the system CUDA; it's not even looking. The only thing we take into account is the driver compatibility via the __cuda virtual package (which you can see in the conda info output).

There have been similar asks in the past (e.g. conda-forge/cudatoolkit-feedstock#61) if you want to take a look.

@jakirkham
Copy link
Member

Right

Since pip is a Python package manager, it can make the choice to not ship things that are not Python (like C/C++ libraries)

Conda is language agnostic. So users typically expect an install command to pull in everything they need (Python & C/C++)

So the general approach has been to broadly ship things as Conda packages. CUDA packages are merely a subset that are also handled this way. Though it is not unique to them

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

3 participants