Sfoglia il codice sorgente

CUDA and Kubuntu notes

Håvard Ose Nordstrand 4 anni fa
parent
commit
ae7e92648a
2 ha cambiato i file con 14 aggiunte e 4 eliminazioni
  1. 12 3
      config/hpc/cuda.md
  2. 2 1
      config/pc/kubuntu.md

+ 12 - 3
config/hpc/cuda.md

@@ -22,21 +22,30 @@ NVIDIA CUDA (Compute Unified Device Architecture) Toolkit, for programming CUDA-
 The toolkit on Linux can be installed in different ways:
 - Through an an existing package in your distro's repos (simplest and most compatible, but may be outdated).
 - Through a downloaded package manager package (up to date but may be incompatible with your installed NVIDIA driver).
-- Through a runfile (same as previous but more cross-distro and harder to manage). 
+- Through a runfile (same as previous but more cross-distro and harder to manage).
 
 Note that the toolkit requires a matching NVIDIA driver to be installed.
 
-**Ubuntu (package from main repos):**
+#### Ubuntu (Main Repos)
+
+Note: May be outdated.
 
 1. Update your NVIDIA driver.
     - Typically through the "Driver Manager" on Ubuntu-based distros, which installs it through the package manager.
     - Check which version you have installed with `dpkg -l | grep nvidia-driver`.
 1. Install the CUDA toolkit: `apt install nvidia-cuda-toolkit`
 
-**Ubuntu (downloaded package or runfile):**
+#### Ubuntu (NVIDIA CUDA Repo)
 
 See [NVIDIA CUDA Installation Guide for Linux (NVIDIA)](https://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html).
 
+1. Follow the steps to add the NVIDIA CUDA repo: [CUDA Toolkit Download (NVIDIA)](https://developer.nvidia.com/cuda-downloads)
+    - But don't install `cuda` yet.
+1. Remove anything NVIDIA or CUDA from the system to avoid conflicts: `apt purge --autoremove cuda nvidia-* libnvidia-*`
+    - Warning: May break your PC. There may be better ways to do this.
+1. Install CUDA from the new repo (includes the NVIDIA driver): `apt install cuda`
+1. Setup path: In `/etc/environment`, append `:/usr/local/cuda/bin` to the end of the PATH list.
+
 ## Running
 
 - Gathering system/GPU information with `nvidia-smi`:

+ 2 - 1
config/pc/kubuntu.md

@@ -42,7 +42,8 @@ breadcrumbs:
 1. Setup firewall:
     - Remove other firewalls: `apt purge ufw firewalld`.
     - Install `iptables iptables-persistent netfilter-persistent`.
-    - Create and run an IPTables script, e.g. [iptables.sh](https://github.com/HON95/scripts/blob/master/linux/iptables/iptables.sh).
+    - (Alternative 1) Create an IPTables script (e.g. [iptables.sh](https://github.com/HON95/scripts/blob/master/linux/iptables/iptables.sh)).
+    - (Alternative 2) Run my preset (basics only, no SSH etc.): `curl https://raw.githubusercontent.com/HON95/scripts/master/linux/iptables/iptables.sh | bash`
 1. Firefox:
     - Disable middle mouse paste by setting `middlemouse.paste` to false in `about:config`.
     - Enable middle mouse "drag scrolling" by setting `general.autoScroll` to true in `about:config`.