Skip to content

Instantly share code, notes, and snippets.

View vicente-gonzalez-ruiz's full-sized avatar

Vicente González Ruiz vicente-gonzalez-ruiz

View GitHub Profile
# Install CUDA (see https://gist.github.com/vicente-gonzalez-ruiz/42801735d0fea2f4e0d22c2e75b2c556)
# Install opticalflow3d
pip install opticalflow3d
# Install required pakages
sudo apt install build-essential zlib1g-dev libncurses5-dev libgdbm-dev libnss3-dev libssl-dev libreadline-dev libffi-dev libsqlite3-dev wget libbz2-dev
# Download from https://www.python.org/downloads/source/ the Python's sources
# Decompress, compile, and install (example)
tar -xf Python-3.10.*.tgz
cd Python-3.10.*/
./configure --enable-optimizations
make -j $(nproc)
# See: https://gist.github.com/Mahedi-61/2a2f1579d4271717d421065168ce6a73
# Remove any previous CUDA installation
sudo apt-get purge nvidia*
sudo apt remove nvidia-*
sudo rm /etc/apt/sources.list.d/cuda*
sudo apt-get autoremove && sudo apt-get autoclean
sudo rm -rf /usr/local/cuda*
# Install the required packages
1. Run nvidia-detector to see the recommended driver version (for example, nvidia-driver-550).
2. sudo apt install nvidia-driver-550
We can see the modules configured in the kernel with:
dkms status
We can know if there is any issue or conflict with the Nvidia module with:
sudo dmest | grep NV
  1. This recipe install OpenCV with CUDA suport in a virtual environment. See https://docs.opencv.org/4.x/d7/d9f/tutorial_linux_install.html and specifically https://docs.opencv.org/4.x/db/d05/tutorial_config_reference.html. This also helps: https://rodosingh.medium.com/using-cmake-to-build-and-install-opencv-for-python-and-c-in-ubuntu-20-04-6c5881eebd9a

  2. Install CUDA Toolkit from https://developer.nvidia.com/cuda-download. Use Download Installer for Linux Ubuntu 22.04 x86_64.

wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/cuda-keyring_1.0-1_all.deb
sudo dpkg -i cuda-keyring_1.0-1_all.deb
sudo apt-get update
sudo apt-get -y install cuda
  1. Reboot and check that nvidia-smi is working.

sudo pacman -Fy bibtool

@vicente-gonzalez-ruiz
vicente-gonzalez-ruiz / virtualbox manjaro kernel 6.2 intel 12 th generation.md
Last active February 22, 2023 17:23
virtualbox manjaro kernel 6.2 intel 12 th generation.md

See https://forum.manjaro.org/t/oracle-vm-stuck-at-20/127927/8

You must add ibt=off to the end of line shown below:

menuentry 'Manjaro Linux (/dev/nvme0n1p5, kernel 6.2.0rc8-1-MANJARO x64, nouveau)' --class manjaro --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-c13a7c80-7780-4e43-90c1-c7cc4b4d36c2' {
	savedefault
	load_video
	set gfxpayload=keep
	insmod gzio
@vicente-gonzalez-ruiz
vicente-gonzalez-ruiz / update_mirrors.md
Created February 21, 2023 22:14
Update pacman mirrors manjaro

sudo pacman-mirrors --country all --api --protocols all --set-branch stable && sudo pacman -Syyu

@vicente-gonzalez-ruiz
vicente-gonzalez-ruiz / xorg_dpi.md
Last active February 5, 2023 17:03
Dots per inch used by the Xorg client.

In ~/.Xresources (example):

! Xft.dpi:       96
Xft.dpi:       192

.
.
.