/images/avatar.png

CUDA unknown error - this may be due to an incorrectly set up environment

Problem description 1 2 3 4 5 6 >>> torch.cuda.is_available() /home/python3.8/site-packages/torch/cuda/__init__.py:141: UserWarning: CUDA initialization: CUDA unknown error - this may be due to an incorrectly set up environment, e.g. changing env variable CUDA_VISIBLE_DEVICES after program start. Setting the available devices to be zero. (Triggered internally at /opt/con da/conda-bld/pytorch_1708025845899/work/c10/cuda/CUDAFunctions.cpp:108.) return torch._C._cuda_getDeviceCount() > 0 False But both nvcc - V and nvidia-smi still work Solution 1 2 sudo rmmod nvidia_uvm sudo modprobe nvidia_uvm

ubuntu 18.04 升级至 glibc_2.28

近期在ubuntu 18.04上开发PyQt6前段时发现问题: ubuntu 18.04.6 默认的 glibc 版本位 2.27, 在运行最新的 Qt Creator 6.0.2 时会报错 1 $ /opt/Qt/Tools/QtCreator/bin/qtcreator 报错 1 /opt/Qt/Tools/QtCreator/bin/qtcreator: /lib/x86_64-linux-gnu/libc.so.6: version `glibc_2.28' not found 此时最佳方法是升级到 ubuntu 20.04 或 ubuntu 22.04, 还有一种"比较省心"的方法, 保留系统仅升级 glibc 下载 https://ftp.gnu.org/gnu/glibc/glibc-2.28.tar.xz 准备编译环境 1 $ sudo apt install build-essential gawk bison 然后解压和编译 1 2 3 4 5 6 $ tar -xJf glibc-2.28.tar.xz $ cd glibc-2.28/ $ mkdir build $ cd build $ ../configure --prefix=/usr $ make 到这一步后不要 sudo make install 立刻安装到 /usr

How to Install and Configure VNC on Ubuntu 20.04

Introduction Virtual Network Computing, or VNC, is a connection system that allows you to use your keyboard and mouse to interact with a graphical desktop environment on a remote server. It makes managing files, software, and settings on a remote server easier for users who are not yet comfortable with the command line. In this guide, you’ll set up a VNC server with TightVNC on an Ubuntu 20.04 server and connect to it securely through an SSH tunnel.