Description
Julia CUDA does not run via jupyter on Ubuntu Desktop
I have spent two days re-configuring system to try and get this working. I discovered this problem when trying to follow the Juliacon21-gpu_workshop I have had a discussion on discourse.julialang.com/GPU
It think this issue is related: libcuda.so.1 is missing with conda env tf-gpu #11743
I believe my evidence demonstrates the jupyter notebook using julia package IJulia
is not using the same method to find libcuda
as the repl.
I can execute PyTorch GPU access from a python 3.9 notebook, so i think that points to IJulia doing something unconventional.
Evidence
in the repl:
j% julia
_
_ _ _(_)_ | Documentation: https://docs.julialang.org
(_) | (_) (_) |
_ _ _| |_ __ _ | Type "?" for help, "]?" for Pkg help.
| | | | | | |/ _` | |
| | |_| | | | (_| | | Version 1.6.2 (2021-07-14)
_/ |\__'_|_|_|\__'_| | Official https://julialang.org/ release
|__/ |
julia> using Libdl
julia> Libdl.find_library("libcuda")
"libcuda"
In the notebook with a freshly reset kernel
I get an empty string as a result - indication of failure to find the library
With jupyterlab installed locally
% conda create -n jupyter-julia python=3.9
% conda activate jupyter-julia
% mamba install -c conda-forge jupyterlab
Check julia in this environment
(jupyter-julia)
% julia --version
julia version 1.6.2
julia> using Libdl
julia> Libdl.find_library("libcuda")
julia> using Libdl
julia> Libdl.find_library("libcuda")
"libcuda"
julia> using CUDA
julia> CUDA.versioninfo()
CUDA toolkit 11.3.1, artifact installation
CUDA driver 11.4.0
NVIDIA driver 470.57.2
Libraries:
- CUBLAS: 11.5.1
- CURAND: 10.2.4
- CUFFT: 10.4.2
- CUSOLVER: 11.1.2
- CUSPARSE: 11.6.0
- CUPTI: 14.0.0
- NVML: 11.0.0+470.57.2
- CUDNN: 8.20.0 (for CUDA 11.3.0)
- CUTENSOR: 1.3.0 (for CUDA 11.2.0)
Toolchain:
- Julia: 1.6.2
- LLVM: 11.0.1
- PTX ISA support: 3.2, 4.0, 4.1, 4.2, 4.3, 5.0, 6.0, 6.1, 6.3, 6.4, 6.5, 7.0
- Device capability support: sm_35, sm_37, sm_50, sm_52, sm_53, sm_60, sm_61, sm_62, sm_70, sm_72, sm_75, sm_80
1 device:
0: NVIDIA GeForce GTX 1050 Ti (sm_61, 3.337 GiB / 3.938 GiB available)
From the newly installed Jupyterlab system with a 1.6 kernel,
using Libdl
Libdl.find_library("libcuda")
""