gpu - Light GBM with Collaborate Google - Stack Overflow

admin2025-04-15  0

I have some app developing in Google Colaborate and need some model with BigData learning, I'm using Light GBM and need to setup GPU / CUDA. But when I trying to install such dependencies I have problem with pip lgbm cuda instalation.

! pip uninstall -y lightgbm
!rm -rf LightGBM

!sudo apt-get update
!sudo apt-get install -y build-essential cmake git python3-dev python3-pip

!sudo apt-get install -y cuda

!pip install --upgrade pip setuptools wheel

!git clone --recursive .git /content/LightGBM

%cd /content/LightGBM

!mkdir build
%cd build

!cmake .. -DUSE_GPU=1 -DCUDA_TOOLKIT_ROOT_DIR=/usr/local/cuda

!make -j$(nproc)

%cd /content/LightGBM/python-package

!pip install .

then message with error

`/content/LightGBM/python-package
Processing /content/LightGBM/python-package
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Installing backend dependencies ... done
  error: subprocess-exited-with-error
  
  × Preparing metadata (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> See above for output.
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  Preparing metadata (pyproject.toml) ... error
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
`
转载请注明原文地址:http://www.anycun.com/QandA/1744720040a86681.html