Daniel Kang's blog

Blog

Home

Purchasing an Electric Vehicle in California

It was shockingly difficult to find a checklist of things to do when purchasing a new electric vehicle. Here’s a list of things I needed to do. This checklist is non-comprehensive, your situation may be different from mine. Step 0: Have a California driver’s license You need a California driver’s license to drive in California. You’ll need to go to the DMV to transfer your license. If you want a REAL ID, make sure to have the documents in the...


Installing CUDA 10.2, CuDNN 7.6.5, TensorRT 7.0 on AWS, Ubuntu 18.04

How to install CUDA 10.2, CuDNN 7.6.5, TensorRT 7.0 in the AWS T4 instance. Step 0: AWS setup (~1 minute) Create a g4dn.xlarge AWS instance. Attach at least 30 GB of HDD space with Ubuntu 18.04. Step 1: Installing CUDA (~5.5 minutes) You can also install CUDA directly from the offline installer, but this is a little easier. sudo apt update sudo apt upgrade -y mkdir install ; cd install wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/cuda-ubuntu1804.pin sudo mv cuda-ubuntu1804.pin /etc/apt/preferences.d/cuda-repository-pin-600 sudo apt-key adv --fetch-keys...


Installing CUDA 10.1, CuDNN 7.6.3, TensorRT 5.0.1 on AWS, Ubuntu 18.04

How to install CUDA 9.2, CuDNN 7.2.1, PyTorch nightly on Google Compute Engine. I expect this to be outdated when PyTorch 1.0 is released (built with CUDA 10.0). This uses Conda, but pip should ideally be as easy. Step 0: GCP setup (~1 minute) Create a GCP instance with 8 CPUs, 1 P100, 30 GB of HDD space with Ubuntu 16.04. Turn off host migration (GPU jobs can’t be resumed). Step 1: Installing CUDA (~5.5 minutes) You can also install...


Installing OpenCV 3.4 from source

Dependencies: sudo apt install cmake python-dev python-numpy gcc g++ sudo apt install python3-dev python3-numpy sudo apt install build-essential libgtk2.0-dev pkg-config libavcodec-dev libavformat-dev libswscale-dev libavresample-dev sudo apt install libtbb2 libtbb-dev libjpeg-dev libpng-dev libtiff-dev libdc1394-22-dev sudo add-apt-repository "deb http://security.ubuntu.com/ubuntu xenial-security main" sudo apt update sudo apt install libjasper1 libjasper-dev Install: git clone https://github.com/opencv/opencv.git git clone https://github.com/opencv/opencv_contrib.git cd opencv_contrib/ git checkout 3.4.4 cd ../opencv/ git checkout 3.4.4 mkdir build cd build cmake \ -D OPENCV_EXTRA_MODULES_PATH=../../opencv_contrib/modules/ \ -D OPENCV_ENABLE_NONFREE=True \ -D CMAKE_BUILD_TYPE=Release \ -D...


Installing CUDA 10.0, CuDNN 7.4.1, TensorRT 5.0.1 on Google Compute Engine

How to install CUDA 9.2, CuDNN 7.2.1, PyTorch nightly on Google Compute Engine. I expect this to be outdated when PyTorch 1.0 is released (built with CUDA 10.0). This uses Conda, but pip should ideally be as easy. Step 0: GCP setup (~1 minute) Create a GCP instance with 8 CPUs, 1 P100, 30 GB of HDD space with Ubuntu 16.04. Turn off host migration (GPU jobs can’t be resumed). Step 1: Installing CUDA (~5.5 minutes) You can also install...


Mounting a Blank Disk on Google Compute Engine

Change $MNT_DIR_NAME as desired. export MNT_DIR_NAME="data" sudo mkdir -p /mnt/disks/$MNT_DIR_NAME sudo mkfs.ext4 -m 0 -F -E lazy_itable_init=0,lazy_journal_init=0,discard /dev/sdb sudo mount -o discard,defaults /dev/sdb /mnt/disks/$MNT_DIR_NAME sudo chmod a+w /mnt/disks/$MNT_DIR_NAME This will automatically mount the disk after reboot, but will not work if you switch disks: sudo cp /etc/fstab /etc/fstab.backup echo UUID=`sudo blkid -s UUID -o value /dev/sdb` \ /mnt/disks/$MNT_DIR_NAME ext4 discard,defaults,nofail 0 2 | sudo tee -a /etc/fstab


Installing CUDA 9.2, CuDNN 7.2.1, PyTorch nightly on Google Compute Engine

How to install CUDA 9.2, CuDNN 7.2.1, PyTorch nightly on Google Compute Engine. I expect this to be outdated when PyTorch 1.0 is released (built with CUDA 10.0). This uses Conda, but pip should ideally be as easy. Step 0: GCP setup (~1 minute) Create a GCP instance with 8 CPUs, 1 P100, 30 GB of HDD space with Ubuntu 16.04. Turn off host migration (GPU jobs can’t be resumed). Step 1: Installing CUDA (~5.5 minutes) You can also install...


About this Blog

Often times I have to perform a technical task that is very similar to something I’ve done before. This blog is mainly a list of tutorials for my future self, so I can do these tasks faster. I’m also hoping to put the expected completion times for the tutorials so I know when something is wrong. The tutorials will mostly be computer systems and deep learning related.