huggingface / huggingface/candle
error while loading shared libraries: libnvrtc.so.12
- Dominant language
- Rust
- Stars
- 21k
- Forks
- 1.8k
- Avg merge
- 16h 42m
- Merged PRs (30d)
- 25
Description
Hi,
This is my Cargo.toml:
```
[package]
name = "myapp"
version = "0.1.0"
edition = "2021"
[dependencies]
candle-core = { git = "https://github.com/huggingface/candle.git", version = "0.5.0", features = ["cuda"] }
```
And this is my code:
```
use candle_core::{Device, Tensor};
fn main() -> Result<(), Box> {
let device = Device::new_cuda(0)?;
let a = Tensor::randn(0f32, 1., (2, 3), &device)?;
let b = Tensor::randn(0f32, 1., (3, 4), &device)?;
let c = a.matmul(&b)?;
println!("{c}");
Ok(())
}
```
When compiling the code, an error occurred:
```
(py311) [wangjw@localhost myapp]$ cargo run
Compiling cudarc v0.10.0
Compiling candle-core v0.5.0 (https://github.com/huggingface/candle.git#b2e81675)
Compiling myapp v0.1.0 (/home/wangjw/data/work/projects/practice/myapp)
Finished `dev` profile [unoptimized + debuginfo] target(s) in 7.96s
Running `target/debug/myapp`
target/debug/myapp: error while loading shared libraries: libnvrtc.so.12: cannot open shared object file: No such file or directory
```
The libnvrtc.so.12 is in "/home/wangjw/programs/miniconda3/envs/py311/lib", how to specify the path ?
Contributor guide
No contributing guide indexed for this repository
Research direction
The report is centered on Cargo.toml and the cargo run entry point; begin by reproducing the dynamic-loader failure with the stated candle-core CUDA dependency and checking the reported conda library location. Done means a documented, reproducible way for this setup to make libnvrtc.so.12 discoverable at runtime, with cargo run succeeding.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- machine-learning
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100