Skip to content

Commit

Permalink
Update USAGE docs for linux
Browse files Browse the repository at this point in the history
  • Loading branch information
hiento09 committed Jan 6, 2024
1 parent 06ba70c commit c78d00b
Showing 1 changed file with 37 additions and 5 deletions.
42 changes: 37 additions & 5 deletions USAGE.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
+-------------------------------+----------------------+----------------------+
```

- You must have CUDA 11.4 or higher.
- You must have CUDA 11.4 or higher (refer [here](https://developer.nvidia.com/cuda-toolkit-archive)).
To check if CUDA is installed, open PowerShell or Terminal and enter the following command:
```bash
nvcc --version
Expand All @@ -32,8 +32,38 @@
Build cuda_11.4.r11.4/compiler.30033411_0
```

- Specifically for Linux, you will need to have a CUDA compatible driver, refer [here](https://docs.nvidia.com/deploy/cuda-compatibility/index.html#binary-compatibility__table-toolkit-driver), and you must add the `.so` libraries of CUDA and the CUDA compatible driver to the `LD_LIBRARY_PATH` environment variable, refer [here](https://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html#post-installation-actions).

- Specifically for Linux:
- you must have `gcc-11`, `g++-11`, `cpp-11` or higher, refer [here](https://gcc.gnu.org/projects/cxx-status.html#cxx17). For Ubuntu, you can install g++ 11 by following the instructions [here](https://linuxconfig.org/how-to-switch-between-multiple-gcc-and-g-compiler-versions-on-ubuntu-20-04-lts-focal-fossa).
```bash
# Example for ubuntu
# Add the following PPA repository
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
# Update the package list
sudo apt update
# Install g++ 11
sudo apt-get install -y gcc-11 g++-11 cpp-11
# Update the default g++ version
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-11 110 \
--slave /usr/bin/g++ g++ /usr/bin/g++-11 \
--slave /usr/bin/gcov gcov /usr/bin/gcov-11 \
--slave /usr/bin/gcc-ar gcc-ar /usr/bin/gcc-ar-11 \
--slave /usr/bin/gcc-ranlib gcc-ranlib /usr/bin/gcc-ranlib-11
sudo update-alternatives --install /usr/bin/cpp cpp /usr/bin/cpp-11 110
# Check the default g++ version
g++ --version
```
- You must add the `.so` libraries of CUDA to the `LD_LIBRARY_PATH` environment variable, refer [here](https://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html#post-installation-actions).
```bash
# Example for ubuntu with CUDA 11.4
sudo nano /etc/environment
# Add /usr/local/cuda-11.4/bin to the PATH environment variable - the first line
# Add the following line to the end of the file
LD_LIBRARY_PATH=/usr/local/cuda-11.4/lib64
# Save and exit
# Restart your computer or log out and log in again, the changes will take effect
```
## How to switch mode CPU/GPU Jan app

By default, Jan app will run in CPU mode. When starting Jan app, the program will automatically check if your computer meets the requirements to run in GPU mode. If it does, we will automatically enable GPU mode and pick the GPU has highest VGRAM for you (feature allowing users to select one or more GPU devices for use - currently in planning). You can check whether you are using CPU mode or GPU mode in the settings/advance section of Jan app. (see image below). ![](/docs/static/img/usage/jan-gpu-enable-setting.png)
Expand All @@ -56,5 +86,7 @@ When you have an issue with GPU mode, share the `settings.json` with us will hel

## Tested on

- Windows 11 Pro 64-bit, NVIDIA GeForce RTX 4070ti GPU, CUDA 12.2, NVIDIA driver 531.18
- Ubuntu 22.04 LTS, NVIDIA GeForce RTX 4070ti GPU, CUDA 12.2, NVIDIA driver 545
- Windows 11 Pro 64-bit, NVIDIA GeForce RTX 4070ti GPU, CUDA 12.2, NVIDIA driver 531.18 (Bare metal)
- Ubuntu 22.04 LTS, NVIDIA GeForce RTX 4070ti GPU, CUDA 12.2, NVIDIA driver 545 (Bare metal)
- Ubuntu 18.04 LTS, NVIDIA GeForce GTX 1660ti GPU, CUDA 12.1, NVIDIA driver 535 (Proxmox VM passthrough GPU)
- Ubuntu 20.04 LTS, NVIDIA GeForce GTX 1660ti GPU, CUDA 12.1, NVIDIA driver 535 (Proxmox VM passthrough GPU)

0 comments on commit c78d00b

Please sign in to comment.