Skip to content

Instantly share code, notes, and snippets.

@wangruohui
wangruohui / Install NVIDIA Driver and CUDA.md
Last active September 15, 2024 18:49
Install NVIDIA Driver and CUDA on Ubuntu / CentOS / Fedora Linux OS
@wangruohui
wangruohui / fix-wget--no-config.md
Last active August 23, 2024 12:01
Fix `wget --no-config` to connect VSCode to CentOS 7

Today I failed to connect VS Code to a CentOS 7 server via SSH and found the following error message from vscode's log output.

wget: unrecognized option '--no-config' Usage: wget [OPTION]... [URL]... Try `wget --help' for more options.

The reason is that VScode needs to download an update package via wget and supply such an argument but wget on CentOS 7 is outdated to support this option.

Fortunately, VS Code respects the PATH variable of the user. So a viable solution is to create a wrapper script of wget (important: chmod +x to make it executable), and put it under ~/.local/bin which is configured in PATH in my .bashrc (important: in front of system paths).

@wangruohui
wangruohui / intel-nvidia.md
Last active July 27, 2024 14:14
Intel for display, Nvidia for computing

Intel for display, NVIDIA for computing

This guide will show you how to use Intel graphics for rendering display and NVIDIA graphics for CUDA computing on Ubuntu 18.04 / 20.04 desktop.

I made this work on an ordinary gaming PC with two graphics devices, an Intel UHD Graphics 630 plus an NVIDIA GeForce GTX 1080 Ti. Both of them can be shown via lspci | grep VGA.

00:02.0 VGA compatible controller: Intel Corporation Device 3e92
01:00.0 VGA compatible controller: NVIDIA Corporation GP102 [GeForce GTX 1080 Ti] (rev a1)
@wangruohui
wangruohui / Caffe Ubuntu 15.10.md
Last active February 28, 2023 09:36
Compile and run Caffe on Ubuntu 15.10

Ubuntu 15.10 have been released for a couple of days. It is a bleeding-edge system coming with Linux kernel 4.2 and GCC 5. However, compiling and running Caffe on this new system is no longer as smooth as on earlier versions. I have done some research related to this issue and finally find a way out. I summarize it here in this short tutorial and I hope more people and enjoy this new system without breaking their works.

Install NVIDIA Driver

The latest NVIDIA driver is officially included in Ubuntu 15.10 repositories. One can install it directly via apt-get.

sudo apt-get install nvidia-352-updates nvidia-modprobe

The nvidia-modprobe utility is used to load NVIDIA kernel modules and create NVIDIA character device files automatically everytime your machine boots up.

Reboot your machine and verify everything works by issuing nvidia-smi or running deviceQuery in CUDA samples.