Install Ubuntu on a Dell desktop configured for the Unified Extensible firmware interface (UEFI) BIOS
This is a tutorial on how to install Ubuntu on a dell PC, then configure MinKNOW, CUDA, and enable GPU based basecaller with MinKNOW.
- Download Ubuntu desktop image, the version we are using is Ubuntu 20.04 LTS
- Follow the Canonical ubuntu totorials on how to Create a Bootable USB stick
Press the F2 key on start up to enter the BIOS setup screens. Ensure that the BIOS is set to UEFI, and disable the Legacy option ROMS, and disable the secure boot. Here are a few reference images on how to do it. Please be aware, your BIOS insterface can be a little different:
After change BIOS, please save the change and exit
- Insert the USB flash drice into the PC USB port and boot or restart the PC
- Tap rapidly on the F12 key when the logo appears during startup
- Select USB device from the boot menu
Follow the CANONICAL ubuntu step by step tutorials to install Ubuntu
A lot of time, you have one ssd drive, in which you install your operating system, and another HDD drive to store your data. For the hard drive, you may want to delete the previous partitions, format it, mount it and then add it to the fstab. The following is a list of tutorials:
- How to Delete Partition in Linux
- Format disk, mount the disk, update fstab
- Disks utility to format a hard drive
By default, when Ubuntu is first installed, remote access via SSH is not allowed. If you need it, enabling SSH on Ubuntu is fairly straightforward. Perform the following steps as root or user with sudo privileges to install and enable SSH on your Ubuntu system:
# Install openssh-server package
sudo apt update
sudo apt install openssh-server
# Verify that SSH is running by typing
sudo systemctl status ssh
# Ubuntu ships with a firewall configuration tool called UFW. If the firewall is enabled on your system, make sure to open the SSH port:
sudo ufw allow ssh
# connecting to the SSH Server
ssh username@ip_address
Firstly, you need to ensure that your GPU is CUDA-capable by typing:
lspci | grep VGA
If you see your GPU model, for example: NVIDIA Corporation TU102 [GeForce RTX 2080 Ti] (rev A1) then you have a GPU available on your machine. IF you don’t see that and you know there is a GPU in the machine, try to install the drivers first. Then start to install CUDA Tookit, in my case, I installed CUDA Toolkit 11.7
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/cuda-ubuntu2004.pin
sudo mv cuda-ubuntu2004.pin /etc/apt/preferences.d/cuda-repository-pin-600
wget https://developer.download.nvidia.com/compute/cuda/11.7.0/local_installers/cuda-repo-ubuntu2004-11-7-local_11.7.0-515.43.04-1_amd64.deb
sudo dpkg -i cuda-repo-ubuntu2004-11-7-local_11.7.0-515.43.04-1_amd64.deb
sudo cp /var/cuda-repo-ubuntu2004-11-7-local/cuda-*-keyring.gpg /usr/share/keyrings/
sudo apt-get update
sudo apt-get -y install cuda
Then, add these three lines to your $HOME/.bashrc
export LD_LIBRARY_PATH=/usr/local/cuda/lib64\
${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
export PATH=/usr/local/cuda/bin:$PATH
You should then reboot your PC for cuda to take full effect. Once rebooted, you should confirm that it is working by writing:
nvidia-smi
nvcc --version
- Notes: in my case, in the secure boot mode, those commands were not working properly. After dsiabling secure boot mode in BIOS, they worked.
Sample output from nvidia-smi command:
- Notes: before Guppy GPU Basecaller gets configured, the guppy_basecaller_server line will not shown in the screenshot
Sample output from nvcc --version command:
If you mess up the nvidia and CUDA ToolKit installation, here is some of the commands to remove nvidia, and cuda toolkits before a reinstallation.
sudo apt-get --purge remove "*cublas*" "*cufft*" "*curand*" "*cusolver*" "*cusparse*" "*npp*" "*nvjpeg*" "cuda*" "nsight*"
sudo apt-get --purge remove "*nvidia*"
sudo apt-get autoremove
sudo reboot
After reboot, you can using command
nvidia-smi
to make sure that your nvidia drive is working properly
For installation, you can just follow the offical document from nanopore. The new version of the MinKnow already includes the gpu based guppy. This has made the installation process much easier:
wget -O- https://mirror.oxfordnanoportal.com/apt/ont-repo.pub | sudo apt-key add -
echo "deb http://mirror.oxfordnanoportal.com/apt $(lsb_release -c | awk '{print $2}')-stable non-free" | sudo tee /etc/apt/sources.list.d/nanoporetech.sources.list
sudo apt-get -y update
sudo apt-get install -y minion-nc
Before editing, I always backup the original app_conf file to app_conf.bak. You will also need to modifying /opt/ont/minknow/conf/app_conf file. Adjust the "gpu_calling" field from false to true, being careful not to modify/delete any commas or quotations. See the reference image below:
For the projects we are doing, we are very often required to check barcodes at both ends during the barcode resolving stage. I used config_editor added that requirement to the minknow configurtion file app_conf
sudo /opt/ont/minknow/bin/config_editor --conf application --filename /opt/ont/minknow/conf/app_conf --set guppy.server_config.extra_arguments="--require_barcodes_both_ends"
By default, MinKNOW will output the data to /var/lib/minknow/data directory and output the log files to /var/log/minknow directory. If you want to change the default data and log output directory, you will need to edit /opt/ont/minknow/conf/user_conf file. Before editing, please backup the original file using the command below:
sudo cp -v user_conf user_conf.bak
You can refer to the screenshots on how to modify the user_conf file
The ouput_dirs section of the original user_conf The ouput_dirs section of the user_conf after customizationAfter modifying the user_conf file, restart MinKNOW, Guppyd
sudo service minknow stop # Resart minknow
sudo service guppyd stop
sudo service guppyd start
sudo service minknow restart
When I connected the device to the computer, I got the error message in the log file as " ERROR: libusb: error [get_usbfs_fd] libusb couldn't open USB device". See the screenshot:
Then, I changed "User=minkow Group=minknow" to "User=root Group=root". After restart the service, then the error message has gone!!!!!!!!!!!!!
(GPU Calling in MinKNOW)[https://gringer.gitlab.io/presentation-notes/2021/10/08/gpu-calling-in-minknow/]
Fully update the system. The upgrade process works best when the current system has all the latest updates installed. You should confirm that these commands complete successfully and that no further updates are available. We also suggest rebooting the system after all the updates are applied, to ensure the latest kernel is being run. To upgrade, run the following commands:
apt-get auto-remove && apt-get clean && apt-get update && apt-get upgrade do-release-upgrade
apt-get --purge remove -y "*cublas*" "*cufft*" "*curand*" "*cusolver*" "*cusparse*" "*npp*" "*nvjpeg*" "cuda*" "nsight*"
apt-get --purge remove -y "*nvidia*"
apt-get autoremove -y
reboot
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/cuda-ubuntu2004.pin
mv cuda-ubuntu2004.pin /etc/apt/preferences.d/cuda-repository-pin-600
wget https://developer.download.nvidia.com/compute/cuda/12.6.3/local_installers/cuda-repo-ubuntu2004-12-6-local_12.6.3-560.35.05-1_amd64.deb
cp /var/cuda-repo-ubuntu2004-12-6-local/cuda-F2089CC5-keyring.gpg /usr/share/keyrings/
dpkg -i cuda-repo-ubuntu2004-12-6-local_12.6.3-560.35.05-1_amd64.deb
cp /var/cuda-repo-ubuntu2004-12-6-local/cuda-*-keyring.gpg /usr/share/keyrings/
apt-get update
#apt-get -y install cuda-toolkit-12-6
apt-get -y install cuda
reboot
You should then reboot your PC for cuda to take full effect. Once rebooted, you should confirm that it is working by writing:
nvidia-smi
nvcc --version
This version of the minknow integrated Dorado into the MinKNOW
apt-get purge -y ont-*
apt-get autoremove
For Ubuntu 20 to add the Oxford Nanopore apt repository, run the command below on a terminal window:
sudo apt update
sudo apt install wget
wget -O- https://cdn.oxfordnanoportal.com/apt/ont-repo.pub | sudo apt-key add -
echo "deb http://cdn.oxfordnanoportal.com/apt focal-stable non-free" | sudo tee /etc/apt/sources.list.d/nanoporetech.sources.list
Install GPU version of the MinKNOW using the command:
sudo apt update
sudo apt install ont-standalone-minknow-gpu-release
reboot