Sample Header Ad - 728x90

Unix & Linux Stack Exchange

Q&A for users of Linux, FreeBSD and other Unix-like operating systems

Latest Questions

0 votes
1 answers
281 views
Apt package pinning: not working for libcudnn8
I set up the following pinning rule: ``` Package: cuda PIN: version 12.1.0-1 Pin-Priority: 9999 Package: libcudnn8 PIN: version 8.5.0.96-1+cuda11.7 Pin-Priority: 99999 Package: libcudnn8-dev PIN: version 8.5.0.96-1+cuda11.7 Pin-Priority: 9999 ``` When I inspect the pinned packages, I receive the fol...
I set up the following pinning rule:
Package: cuda
PIN: version 12.1.0-1
Pin-Priority: 9999
 
Package: libcudnn8
PIN: version 8.5.0.96-1+cuda11.7
Pin-Priority: 99999
 
Package: libcudnn8-dev
PIN: version 8.5.0.96-1+cuda11.7
Pin-Priority: 9999
When I inspect the pinned packages, I receive the following output:
/etc/apt/preferences.d$ apt-cache policy
Package files:
 ...
Pinned packages:
     xserver-xorg-video-nouveau -> 1:1.0.17-2build1 with priority 9999
     libnvidia-common-525 -> 525.105.17-0ubuntu0.22.04.1 with priority 9999
     libnvidia-fbc1-525 -> 525.105.17-0ubuntu0.22.04.1 with priority 9999
     libnvidia-gl-525 -> 525.105.17-0ubuntu0.22.04.1 with priority 9999
     libnvidia-extra-525 -> 525.105.17-0ubuntu0.22.04.1 with priority 9999
     nvidia-compute-utils-525 -> 525.105.17-0ubuntu0.22.04.1 with priority 9999
     nvidia-container-runtime -> 3.12.0-1 with priority 9999
     libnvidia-encode-525 -> 525.105.17-0ubuntu0.22.04.1 with priority 9999
     nsight-compute -> 2021.3.1.4~11.5.1-1ubuntu1 with priority -1
     nvidia-utils-525 -> 525.105.17-0ubuntu0.22.04.1 with priority 9999
     ubuntu-drivers-common -> 1:0.9.6.1 with priority 9999
     xserver-xorg-video-nvidia-525 -> 525.105.17-0ubuntu0.22.04.1 with priority 9999
     libvdpau1 -> 1.4-3build2 with priority 9999
     libnvidia-decode-525 -> 525.105.17-0ubuntu0.22.04.1 with priority 9999
     libnvidia-egl-wayland1 -> 1:1.1.9-1.1 with priority 9999
     docker-ce -> 5:20.10.23~3-0~ubuntu-jammy with priority 9999
     nvidia-kernel-common-525 -> 525.105.17-0ubuntu0.22.04.1 with priority 9999
     vdpau-driver-all -> 1.4-3build2 with priority 9999
     telegraf -> 1.25.2-1 with priority 9999
     libnvidia-cfg1-525 -> 525.105.17-0ubuntu0.22.04.1 with priority 9999
     nvidia-kernel-source-525 -> 525.105.17-0ubuntu0.22.04.1 with priority 9999
     libnvidia-compute-525 -> 525.105.17-0ubuntu0.22.04.1 with priority 9999
     nsight-systems -> 2021.3.3.2~11.5.1-1ubuntu1 with priority -1
     libcudnn8-dev -> 8.5.0.96-1+cuda11.7 with priority 9999
so pinning the libcundnn8-dev package was successfully pinned by the configuration file above, but libcundd8 wasn't pinned successfully. This is also confirmed by the following output:
/etc/apt/preferences.d$ apt-cache policy libcudnn8
libcudnn8:
  Installed: 8.5.0.96-1+cuda11.7
  Candidate: 8.9.0.131-1+cuda12.1
  Version table:
     8.9.0.131-1+cuda12.1 600
        600 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64   Packages
     8.9.0.131-1+cuda11.8 600
        600 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64   Packages
     8.8.1.3-1+cuda12.0 600
        600 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64   Packages
     8.8.1.3-1+cuda11.8 600
        600 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64   Packages
     8.8.0.121-1+cuda12.0 600
        600 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64   Packages
     8.8.0.121-1+cuda11.8 600
        600 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64   Packages
     8.7.0.84-1+cuda11.8 600
        600 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64   Packages
     8.6.0.163-1+cuda11.8 600
        600 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64   Packages
 *** 8.5.0.96-1+cuda11.7 600
        600 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64   Packages
        100 /var/lib/dpkg/status
What did I do wrong? *edit*: fixed typo in the pin file that I made when copying the file into this question. *edit*: also tried giving the libcudnn8 package the same priority as the other packages (9999).
mutableVoid (168 rep)
Apr 17, 2023, 12:00 PM • Last activity: Apr 17, 2023, 12:45 PM
2 votes
1 answers
488 views
Stuck at booting after upgrading
My GPU is **NVIDIA - GeForce RTX 3090 Ti**, and the OS is **Ubuntu 18.04**. As my code didn’t work, I checked the versions of python, pytorch, cuda, and cudnn. * Python: 3.6 * torch. version : 1.4.0 * torch.version.cuda : 10.1 (nvidia-smi shows CUDA version 11.3) * cudnn: 7.6.3 These are not compati...
My GPU is **NVIDIA - GeForce RTX 3090 Ti**, and the OS is **Ubuntu 18.04**. As my code didn’t work, I checked the versions of python, pytorch, cuda, and cudnn. * Python: 3.6 * torch. version : 1.4.0 * torch.version.cuda : 10.1 (nvidia-smi shows CUDA version 11.3) * cudnn: 7.6.3 These are not compatible with 3090 Ti, I successfully upgraded **Python to 3.9**, and **Pytorch to 1.12.1+cu102**. However, “pip3 install cuda-python” and “pip install nvidia-cudnn” did not work for me. So I followed the steps on the website. * **For cuda (tried version 11.8)**: https://developer.nvidia.com/cuda-downloads?target_os=Linux&target_arch=x86_64&Distribution=Ubuntu&target_version=18.04&target_type=deb_local * **For cudnn (tried version 8.6.0, tar file installation)**: Installation Guide :: NVIDIA Deep Learning cuDNN Documentation After the installation steps, nvidia-smi shows “Failed to initialize NVML: Driver/library version mismatch”. I found that rebooting would work, but the system is stuck at the rebooting step. dpkg -l |grep nvidia iU libnvidia-cfg1-520:amd64 520.61.05-0ubuntu1 amd64 NVIDIA binary OpenGL/GLX configuration library ii libnvidia-common-465 465.19.01-0ubuntu1 all Shared files used by the NVIDIA libraries iU libnvidia-common-520 520.61.05-0ubuntu1 all Shared files used by the NVIDIA libraries rc libnvidia-compute-465:amd64 465.19.01-0ubuntu1 amd64 NVIDIA libcompute package iU libnvidia-compute-520:amd64 520.61.05-0ubuntu1 amd64 NVIDIA libcompute package iU libnvidia-compute-520:i386 520.61.05-0ubuntu1 i386 NVIDIA libcompute package ii libnvidia-container-tools 1.11.0-1 amd64 NVIDIA container runtime library (command-line tools) ii libnvidia-container1:amd64 1.11.0-1 amd64 NVIDIA container runtime library iU libnvidia-decode-520:amd64 520.61.05-0ubuntu1 amd64 NVIDIA Video Decoding runtime libraries iU libnvidia-decode-520:i386 520.61.05-0ubuntu1 i386 NVIDIA Video Decoding runtime libraries iU libnvidia-encode-520:amd64 520.61.05-0ubuntu1 amd64 NVENC Video Encoding runtime library iU libnvidia-encode-520:i386 520.61.05-0ubuntu1 i386 NVENC Video Encoding runtime library iU libnvidia-extra-520:amd64 520.61.05-0ubuntu1 amd64 Extra libraries for the NVIDIA driver iU libnvidia-fbc1-520:amd64 520.61.05-0ubuntu1 amd64 NVIDIA OpenGL-based Framebuffer Capture runtime library iU libnvidia-fbc1-520:i386 520.61.05-0ubuntu1 i386 NVIDIA OpenGL-based Framebuffer Capture runtime library iU libnvidia-gl-520:amd64 520.61.05-0ubuntu1 amd64 NVIDIA OpenGL/GLX/EGL/GLES GLVND libraries and Vulkan ICD iU libnvidia-gl-520:i386 520.61.05-0ubuntu1 i386 NVIDIA OpenGL/GLX/EGL/GLES GLVND libraries and Vulkan ICD rc nvidia-compute-utils-465 465.19.01-0ubuntu1 amd64 NVIDIA compute utilities iU nvidia-compute-utils-520 520.61.05-0ubuntu1 amd64 NVIDIA compute utilities ii nvidia-container-toolkit 1.11.0-1 amd64 NVIDIA Container toolkit ii nvidia-container-toolkit-base 1.11.0-1 amd64 NVIDIA Container Toolkit Base rc nvidia-dkms-465 465.19.01-0ubuntu1 amd64 NVIDIA DKMS package iU nvidia-dkms-520 520.61.05-0ubuntu1 amd64 NVIDIA DKMS package iU nvidia-driver-520 520.61.05-0ubuntu1 amd64 NVIDIA driver metapackage rc nvidia-kernel-common-465 465.19.01-0ubuntu1 amd64 Shared files used with the kernel module iU nvidia-kernel-common-520 520.61.05-0ubuntu1 amd64 Shared files used with the kernel module iU nvidia-kernel-source-520 520.61.05-0ubuntu1 amd64 NVIDIA kernel source package iU nvidia-modprobe 520.61.05-0ubuntu1 amd64 Load the NVIDIA kernel driver and create device files ii nvidia-opencl-dev:amd64 9.1.85-3ubuntu1 amd64 NVIDIA OpenCL development files ii nvidia-prime 0.8.16~0.18.04.1 all Tools to enable NVIDIA’s Prime iU nvidia-settings 520.61.05-0ubuntu1 amd64 Tool for configuring the NVIDIA graphics driver iU nvidia-utils-520 520.61.05-0ubuntu1 amd64 NVIDIA driver support binaries iU xserver-xorg-video-nvidia-520 520.61.05-0ubuntu1 amd64 NVIDIA binary Xorg driver ls -l /usr/lib/x86_64-linux-gnu/libcuda* lrwxrwxrwx 1 root root 28 Sep 29 05:22 /usr/lib/x86_64-linux-gnu/libcudadebugger.so.1 → libcudadebugger.so.520.61.05 -rw-r–r-- 1 root root 10934360 Sep 29 01:20 /usr/lib/x86_64-linux-gnu/libcudadebugger.so.520.61.05 lrwxrwxrwx 1 root root 12 Sep 29 05:22 /usr/lib/x86_64-linux-gnu/libcuda.so → libcuda.so.1 lrwxrwxrwx 1 root root 20 Sep 29 05:22 /usr/lib/x86_64-linux-gnu/libcuda.so.1 → libcuda.so.520.61.05 -rw-r–r-- 1 root root 26284256 Sep 29 01:56 /usr/lib/x86_64-linux-gnu/libcuda.so.520.61.05 dkms status virtualbox, 5.2.42, 5.4.0-126-generic, x86_64: installed virtualbox, 5.2.42, 5.4.0-72-generic, x86_64: installed
user12077723 (23 rep)
Oct 19, 2022, 10:07 PM • Last activity: Oct 28, 2022, 09:19 AM
1 votes
2 answers
3011 views
Can't build Darknet with CUDNN support
I`m trying to compile the sources from https://github.com/pjreddie/darknet using manjaro linux. But the build is having problems when I try to use the CUDNN switch. g++ -DOPENCV -I/usr/include/opencv4/opencv2/ `pkg-config --cflags opencv` -DGPU -I/usr/local/cuda/include/ -DCUDNN -Wall -Wfatal-errors...
I`m trying to compile the sources from https://github.com/pjreddie/darknet using manjaro linux. But the build is having problems when I try to use the CUDNN switch. g++ -DOPENCV -I/usr/include/opencv4/opencv2/ pkg-config --cflags opencv -DGPU -I/usr/local/cuda/include/ -DCUDNN -Wall -Wfatal-errors -Wno-unused-result -Wno-unknown-pragmas -Ofast -DOPENCV -DGPU -DCUDNN -I/usr/local/cudnn/include -c ./src/http_stream.cpp -o obj/http_stream.o Package opencv was not found in the pkg-config search path. Perhaps you should add the directory containing `opencv.pc' to the PKG_CONFIG_PATH environment variable Package 'opencv', required by 'virtual:world', not found ./src/http_stream.cpp:46:10: fatal error: opencv2/opencv.hpp: Arquivo ou diretório inexistente #include "opencv2/opencv.hpp" ^~~~~~~~~~~~~~~~~~~~ Here is my make file. GPU=1 CUDNN=1 CUDNN_HALF=0 OPENCV=1 AVX=0 OPENMP=0 LIBSO=0 # set GPU=1 and CUDNN=1 to speedup on GPU # set CUDNN_HALF=1 to further speedup 3 x times (Mixed-precision using Tensor Cores) on GPU Tesla V100, Titan V, DGX-2 # set AVX=1 and OPENMP=1 to speedup on CPU (if error occurs then set AVX=0) DEBUG=0 ARCH= -gencode arch=compute_30,code=sm_30 \ -gencode arch=compute_35,code=sm_35 \ -gencode arch=compute_50,code=[sm_50,compute_50] \ -gencode arch=compute_52,code=[sm_52,compute_52] \ -gencode arch=compute_61,code=[sm_61,compute_61] OS := $(shell uname) # Tesla V100 # ARCH= -gencode arch=compute_70,code=[sm_70,compute_70] # GTX 1080, GTX 1070, GTX 1060, GTX 1050, GTX 1030, Titan Xp, Tesla P40, Tesla P4 ARCH= -gencode arch=compute_61,code=sm_61 -gencode arch=compute_61,code=compute_61 # GP100/Tesla P100 � DGX-1 # ARCH= -gencode arch=compute_60,code=sm_60 # For Jetson TX1, Tegra X1, DRIVE CX, DRIVE PX - uncomment: # ARCH= -gencode arch=compute_53,code=[sm_53,compute_53] # For Jetson Tx2 or Drive-PX2 uncomment: # ARCH= -gencode arch=compute_62,code=[sm_62,compute_62] VPATH=./src/ EXEC=darknet OBJDIR=./obj/ ifeq ($(LIBSO), 1) LIBNAMESO=darknet.so APPNAMESO=uselib endif CC=gcc CPP=g++ NVCC=nvcc OPTS=-Ofast LDFLAGS= -lm -pthread COMMON= CFLAGS=-Wall -Wfatal-errors -Wno-unused-result -Wno-unknown-pragmas ifeq ($(DEBUG), 1) OPTS= -O0 -g else ifeq ($(AVX), 1) CFLAGS+= -ffp-contract=fast -mavx -msse4.1 -msse4a endif endif CFLAGS+=$(OPTS) ifeq ($(OPENCV), 1) COMMON+= -DOPENCV -I/usr/include/opencv4/opencv2/ CFLAGS+= -DOPENCV LDFLAGS+= pkg-config --libs opencv COMMON+= pkg-config --cflags opencv endif ifeq ($(OPENMP), 1) CFLAGS+= -fopenmp LDFLAGS+= -lgomp endif ifeq ($(GPU), 1) COMMON+= -DGPU -I/usr/local/cuda/include/ CFLAGS+= -DGPU ifeq ($(OS),Darwin) #MAC LDFLAGS+= -L/usr/local/cuda/lib -lcuda -lcudart -lcublas -lcurand else LDFLAGS+= -L/usr/local/cuda/lib64 -lcuda -lcudart -lcublas -lcurand endif endif ifeq ($(CUDNN), 1) COMMON+= -DCUDNN ifeq ($(OS),Darwin) #MAC CFLAGS+= -DCUDNN -I/usr/local/cuda/include LDFLAGS+= -L/usr/local/cuda/lib -lcudnn else CFLAGS+= -DCUDNN -I/usr/local/cudnn/include LDFLAGS+= -L/usr/local/cudnn/lib64 -lcudnn endif endif ifeq ($(CUDNN_HALF), 1) COMMON+= -DCUDNN_HALF CFLAGS+= -DCUDNN_HALF ARCH+= -gencode arch=compute_70,code=[sm_70,compute_70] endif OBJ=http_stream.o gemm.o utils.o cuda.o convolutional_layer.o list.o image.o activations.o im2col.o col2im.o blas.o crop_layer.o dropout_layer.o maxpool_layer.o softmax_layer.o data.o matrix.o network.o connected_layer.o cost_layer.o parser.o option_list.o darknet.o detection_layer.o captcha.o route_layer.o writing.o box.o nightmare.o normalization_layer.o avgpool_layer.o coco.o dice.o yolo.o detector.o layer.o compare.o classifier.o local_layer.o swag.o shortcut_layer.o activation_layer.o rnn_layer.o gru_layer.o rnn.o rnn_vid.o crnn_layer.o demo.o tag.o cifar.o go.o batchnorm_layer.o art.o region_layer.o reorg_layer.o reorg_old_layer.o super.o voxel.o tree.o yolo_layer.o upsample_layer.o ifeq ($(GPU), 1) LDFLAGS+= -lstdc++ OBJ+=convolutional_kernels.o activation_kernels.o im2col_kernels.o col2im_kernels.o blas_kernels.o crop_layer_kernels.o dropout_layer_kernels.o maxpool_layer_kernels.o network_kernels.o avgpool_layer_kernels.o endif OBJS = $(addprefix $(OBJDIR), $(OBJ)) DEPS = $(wildcard src/*.h) Makefile all: obj backup results $(EXEC) $(LIBNAMESO) $(APPNAMESO) ifeq ($(LIBSO), 1) CFLAGS+= -fPIC $(LIBNAMESO): $(OBJS) src/yolo_v2_class.hpp src/yolo_v2_class.cpp $(CPP) -shared -std=c++11 -fvisibility=hidden -DYOLODLL_EXPORTS $(COMMON) $(CFLAGS) $(OBJS) src/yolo_v2_class.cpp -o $@ $(LDFLAGS) $(APPNAMESO): $(LIBNAMESO) src/yolo_v2_class.hpp src/yolo_console_dll.cpp $(CPP) -std=c++11 $(COMMON) $(CFLAGS) -o $@ src/yolo_console_dll.cpp $(LDFLAGS) -L ./ -l:$(LIBNAMESO) endif $(EXEC): $(OBJS) $(CPP) $(COMMON) $(CFLAGS) $^ -o $@ $(LDFLAGS) $(OBJDIR)%.o: %.c $(DEPS) $(CC) $(COMMON) $(CFLAGS) -c $< -o $@ $(OBJDIR)%.o: %.cpp $(DEPS) $(CPP) $(COMMON) $(CFLAGS) -c $< -o $@ $(OBJDIR)%.o: %.cu $(DEPS) $(NVCC) $(ARCH) $(COMMON) --compiler-options "$(CFLAGS)" -c $< -o $@ obj: mkdir -p obj backup: mkdir -p backup results: mkdir -p results .PHONY: clean clean: rm -rf $(OBJS) $(EXEC) $(LIBNAMESO) $(APPNAMESO) It seems something related with new gcc or opencv version but I`m not right.
vfbsilva (3757 rep)
May 18, 2019, 03:05 AM • Last activity: Jan 26, 2021, 07:11 PM
0 votes
0 answers
1419 views
Cuda with Conda installation - libcuda.so.1 not found
I've been trying to install CONDA with Cuda in Centos 7. I am following this [installation][1]. When I go through with the install I get no errors thrown until I try to import tensorflow in the environment. When I do, the following stack-trace accompanies a failure to import: ``` File "/root/anacond...
I've been trying to install CONDA with Cuda in Centos 7. I am following this installation . When I go through with the install I get no errors thrown until I try to import tensorflow in the environment. When I do, the following stack-trace accompanies a failure to import:
File "/root/anaconda3/envs/tf_gpu/lib/python3.7/site-packages/tensorflow/python/pywrap_tensorflow.py", line 58, in 
    from tensorflow.python.pywrap_tensorflow_internal import *
  File "/root/anaconda3/envs/tf_gpu/lib/python3.7/site-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 28, in 
    _pywrap_tensorflow_internal = swig_import_helper()
  File "/root/anaconda3/envs/tf_gpu/lib/python3.7/site-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 24, in swig_import_helper
    _mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description)
  File "/root/anaconda3/envs/tf_gpu/lib/python3.7/imp.py", line 242, in load_module
    return load_dynamic(name, filename, file)
  File "/root/anaconda3/envs/tf_gpu/lib/python3.7/imp.py", line 342, in load_dynamic
    return _load(spec)
ImportError: libcuda.so.1: cannot open shared object file: No such file or directory

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "", line 1, in 
  File "/root/anaconda3/envs/tf_gpu/lib/python3.7/site-packages/tensorflow/__init__.py", line 24, in 
    from tensorflow.python import pywrap_tensorflow  # pylint: disable=unused-import
  File "/root/anaconda3/envs/tf_gpu/lib/python3.7/site-packages/tensorflow/python/__init__.py", line 49, in 
    from tensorflow.python import pywrap_tensorflow
  File "/root/anaconda3/envs/tf_gpu/lib/python3.7/site-packages/tensorflow/python/pywrap_tensorflow.py", line 74, in 
    raise ImportError(msg)
ImportError: Traceback (most recent call last):
  File "/root/anaconda3/envs/tf_gpu/lib/python3.7/site-packages/tensorflow/python/pywrap_tensorflow.py", line 58, in 
    from tensorflow.python.pywrap_tensorflow_internal import *
  File "/root/anaconda3/envs/tf_gpu/lib/python3.7/site-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 28, in 
    _pywrap_tensorflow_internal = swig_import_helper()
  File "/root/anaconda3/envs/tf_gpu/lib/python3.7/site-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 24, in swig_import_helper
    _mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description)
  File "/root/anaconda3/envs/tf_gpu/lib/python3.7/imp.py", line 242, in load_module
    return load_dynamic(name, filename, file)
  File "/root/anaconda3/envs/tf_gpu/lib/python3.7/imp.py", line 342, in load_dynamic
    return _load(spec)
**ImportError: libcuda.so.1: cannot open shared object file: No such file or directory**


Failed to load the native TensorFlow runtime.

See https://www.tensorflow.org/install/errors 

for some common reasons and solutions.  Include the entire stack trace
above this error message when asking for help.
The error is the inability to access the libcuda.so.1 resource. Am I incorrect in thinking that Conda handles all aspects of the installation? System details: OS: Centos7 Kernel Version: 3.10.0 Cuda version: 10.0 Conda version: 4.6.14 GPU: Nvidia 1080Ti
user355881
Jun 1, 2019, 11:07 PM • Last activity: Jan 18, 2021, 12:11 PM
0 votes
1 answers
350 views
Installing Ubuntu 18.04 cuDNN on Ubuntu 19.10
I would like to install NVidia cuDNN on my Ubuntu 19.10 machine. The [cuDNN download page][1] only offers Ubuntu 18.04. Can I just go ahead and install an 18.04 package on 19.10 and assume that it will probably work? [1]: https://developer.nvidia.com/rdp/cudnn-download
I would like to install NVidia cuDNN on my Ubuntu 19.10 machine. The cuDNN download page only offers Ubuntu 18.04. Can I just go ahead and install an 18.04 package on 19.10 and assume that it will probably work?
Lars Ericson (103 rep)
Nov 24, 2019, 06:50 PM • Last activity: Nov 24, 2019, 08:22 PM
Showing page 1 of 5 total questions