Skip to content

Instantly share code, notes, and snippets.

@Ayke
Ayke / cuda-wsl2-ubuntu.md
Last active November 13, 2024 11:03
Everything About CUDA in WSL2 Ubuntu

Prerequisites, i.e. the most important things

  1. Time of writing: Jan 18, 2023, updated on Sep 22, 2024. The following assumes that you're trying to install CUDA on WSL2 Ubuntu.

  2. Check support matrix first before you install any version of CUDA, because chances are the latest CUDA does not have cuDNN support yet, then you'll have to re-install older version if you found out later.

    https://docs.nvidia.com/deeplearning/cudnn/support-matrix/index.html#cudnn-cuda-hardware-versions

    At the time of writing, the latest cuDNN version is 8.7 and it supports CUDA 11.8.

  3. Windows 10 must be build 20145 or later, or you should be on Windows 11.

@Ayke
Ayke / python38.md
Created July 2, 2020 04:25
Install python3.8 on TX2

Download source file from python website Goes with README

lsb_release problem:

subprocess.CalledProcessError: Command '('lsb_release', '-a')' returned non-zero exit status 1. Solution: sudo rm /usr/bin/lsb_release

@Ayke
Ayke / DetectrononTX2.md
Created February 14, 2020 23:57
Configure Detectron 2 on nvidia TX2

Install Detectron 2

As it says here, https://github.com/facebookresearch/detectron2/blob/master/INSTALL.md we need to install a few modules before installing detectron.

The only part can be difficult is to install pytorch on TX2 since TX2 is aarch64 architecture, the installation instructions on pytorch website do not work. We need to install via this page: https://devtalk.nvidia.com/default/topic/1049071/jetson-nano/pytorch-for-jetson-nano/

To upgrade pyyaml, just pip3 install pyyaml --ignore-installed

Also you might want to keep using python3 and pip3 to avoid using python2

@Ayke
Ayke / YOLOonTX2.md
Last active December 22, 2020 00:00
Configure YOLO Detection on TX2

First I assumed that you have already downloaded YOLO to /home/nvidia/darknet where nvidia is the host name.

YOLO installation

mavx options unavailable

CC: error: unrecognized command line option ‘-mavx’
CC: error: unrecognized command line option ‘-mavx2’
CC: error: unrecognized command line option ‘-msse3’
CC: error: unrecognized command line option ‘-msse4.1’
CC: error: unrecognized command line option ‘-msse4.2’
@Ayke
Ayke / OpenCV on TX2.md
Last active January 1, 2024 19:02
Install OpenCV 4 on Jetson TX2

OpenCV version: 4.3.0 Python version: 3.6

Prerequisite

Required libraries

sudo apt-get update
sudo apt-get install curl libssl-dev
sudo apt-get install ffmpeg
@Ayke
Ayke / cuda.md
Last active January 7, 2021 22:50
Driver and CUDA

Driver install

To stop the currently running nvidia driver:

sudo systemctl isolate multi-user.target
sudo modprobe -r nvidia-drm

CUDA Installation

@Ayke
Ayke / ffmpeg.md
Last active March 13, 2020 00:10
ffmpeg installation from source (full installation without libaom)

Installation

Environment: Ubuntu 16.04

Package requirement for ffmpeg

sudo apt-get update -qq && sudo apt-get -y install \
  autoconf \
  automake \
  build-essential \
  cmake \
@Ayke
Ayke / OpenCV.md
Last active July 2, 2020 05:52
OpenCV 4 Python Installation Notes for CUDA 10

Environment: Ubuntu 16.04, CUDA 10

The trickiest part is, OpenCV 4 only supports CUDA 10, not CUDA 10.1. So if you have installed CUDA 10.1, you have to get 10.0 instead.

Installation

Install required packages

sudo apt-get install gcc gfortran python-dev libopenblas-dev liblapack-dev cython

sudo apt-get install build-essential