diff --git a/.github/workflows/jan-electron-linter-and-test.yml b/.github/workflows/jan-electron-linter-and-test.yml index d4689ca60c..040d834aee 100644 --- a/.github/workflows/jan-electron-linter-and-test.yml +++ b/.github/workflows/jan-electron-linter-and-test.yml @@ -28,6 +28,9 @@ on: - "node_modules/**" - "yarn.lock" - "Makefile" + - "extensions/**" + - "core/**" + - "!README.md" jobs: test-on-macos: diff --git a/README.md b/README.md index cfa7169f15..09e900623c 100644 --- a/README.md +++ b/README.md @@ -173,7 +173,7 @@ To reset your installation: - To enable GPU support: - Nvidia GPU with CUDA Toolkit 11.7 or higher - Nvidia driver 470.63.01 or higher -Linux: +- Linux: - glibc 2.27 or higher (check with `ldd --version`) - gcc 11, g++ 11, cpp 11 or higher, refer to this [link](https://jan.ai/guides/troubleshooting/gpu-not-used/#specific-requirements-for-linux) for more information - To enable GPU support: diff --git a/USAGE.md b/USAGE.md deleted file mode 100644 index c42c309e76..0000000000 --- a/USAGE.md +++ /dev/null @@ -1,92 +0,0 @@ -## Requirements for running Jan App in GPU mode on Windows and Linux -- You must have an NVIDIA driver that supports CUDA 11.4 or higher. Refer [here](https://docs.nvidia.com/deploy/cuda-compatibility/index.html#binary-compatibility__table-toolkit-driver). - To check if the NVIDIA driver is installed, open PowerShell or Terminal and enter the following command: - ```bash - nvidia-smi - ``` - If you see a result similar to the following, you have successfully installed the NVIDIA driver: - ```bash - +-----------------------------------------------------------------------------+ - | NVIDIA-SMI 470.57.02 Driver Version: 470.57.02 CUDA Version: 11.4 | - |-------------------------------+----------------------+----------------------+ - | GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC | - | Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. | - | | | MIG M. | - |===============================+======================+======================| - | 0 NVIDIA GeForce ... Off | 00000000:01:00.0 On | N/A | - | 0% 51C P8 10W / 170W | 364MiB / 7982MiB | 0% Default | - | | | N/A | - +-------------------------------+----------------------+----------------------+ - ``` - -- 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 - ``` - If you see a result similar to the following, you have successfully installed CUDA: - ```bash - nvcc: NVIDIA (R) Cuda compiler driver - - Cuda compilation tools, release 11.4, V11.4.100 - Build cuda_11.4.r11.4/compiler.30033411_0 - ``` - -- 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) - -If you have GPU mode but it is not enabled by default, the following possibilities may exist, you can follow the next steps to fix the error: - -1. You have not installed the NVIDIA driver, refer to the NVIDIA driver that supports CUDA 11.4 [here](https://docs.nvidia.com/deploy/cuda-compatibility/index.html#binary-compatibility__table-toolkit-driver). - -2. You have not installed the CUDA toolkit or your CUDA toolkit is not compatible with the NVIDIA driver, refer to CUDA compatibility [here](https://docs.nvidia.com/deploy/cuda-compatibility/index.html#binary-compatibility__table-toolkit-driver). - -3. You have not installed 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). For Windows, add the `.dll` libraries of CUDA and the CUDA compatible driver to the `PATH` environment variable. Usually, when installing CUDA on Windows, this environment variable is automatically added, but if you do not see it, you can add it manually by referring [here](https://docs.nvidia.com/cuda/cuda-installation-guide-microsoft-windows/index.html#environment-setup). - -## To check the current GPU-related settings that Jan app has detected, you can go to the Settings/Advanced section as shown in the image below. -![](/docs/static/img/usage/jan-open-home-directory.png) -![](/docs/static/img/usage/jan-open-settings-1.png) -![](/docs/static/img/usage/jan-open-settings-2.png) -![](/docs/static/img/usage/jan-open-settings-3.png) - -When you have an issue with GPU mode, share the `settings.json` with us will help us to solve the problem faster. - -## Tested on - -- 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) \ No newline at end of file diff --git a/docs/docs/guides/08-troubleshooting/03-gpu-not-used.mdx b/docs/docs/guides/08-troubleshooting/03-gpu-not-used.mdx index 64f20ee3e3..5517a45dbf 100644 --- a/docs/docs/guides/08-troubleshooting/03-gpu-not-used.mdx +++ b/docs/docs/guides/08-troubleshooting/03-gpu-not-used.mdx @@ -21,7 +21,7 @@ This guide provides steps to troubleshoot and resolve issues when Jan app does n ### NVIDIA Driver -Ensure that you have installed the NVIDIA driver that supports CUDA 11.4 or higher. For a detailed of CUDA compatibility, please refer [here](https://docs.nvidia.com/deploy/cuda-compatibility/index.html#binary-compatibility__table-toolkit-driver). +Ensure that you have installed the NVIDIA driver that supports CUDA 11.7 or higher. For a detailed of CUDA compatibility, please refer [here](https://docs.nvidia.com/deploy/cuda-compatibility/index.html#binary-compatibility__table-toolkit-driver). To verify, open PowerShell or Terminal and enter the following command: @@ -33,7 +33,7 @@ If you see a result similar to the following, you have successfully installed th ```bash +-----------------------------------------------------------------------------+ -| NVIDIA-SMI 470.57.02 Driver Version: 470.57.02 CUDA Version: 11.4 | +| NVIDIA-SMI 470.57.02 Driver Version: 470.57.02 CUDA Version: 11.7 | |-------------------------------+----------------------+----------------------+ | GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC | | Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. | @@ -60,8 +60,8 @@ If you see a result similar to the following, you have successfully installed CU ```bash nvcc: NVIDIA (R) Cuda compiler driver -Cuda compilation tools, release 11.4, V11.4.100 -Build cuda_11.4.r11.4/compiler.30033411_0 +Cuda compilation tools, release 11.7, V11.7.100 +Build cuda_11.7.r11.7/compiler.30033411_0 ``` ### Specific Requirements for Linux @@ -91,11 +91,11 @@ g++ --version **Post-Installation Actions**: You must add the `.so` libraries of CUDA to the `LD_LIBRARY_PATH` environment variable by following the [Post-installation Actions instruction](https://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html#post-installation-actions). ```bash -# Example for ubuntu with CUDA 11.4 +# Example for ubuntu with CUDA 11.7 sudo nano /etc/environment -# Add /usr/local/cuda-11.4/bin to the PATH environment variable - the first line +# Add /usr/local/cuda-11.7/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 +LD_LIBRARY_PATH=/usr/local/cuda-11.7/lib64 # Save and exit # Restart your computer or log out and log in again, the changes will take effect @@ -111,7 +111,7 @@ If you find that GPU mode is available but not enabled by default, consider the :::tip -1. Check if you have installed the NVIDIA driver that supports CUDA 11.4 or higher. For a detailed of CUDA compatibility, please refer [here](https://docs.nvidia.com/deploy/cuda-compatibility/index.html#binary-compatibility__table-toolkit-driver). +1. Check if you have installed the NVIDIA driver that supports CUDA 11.7 or higher. For a detailed of CUDA compatibility, please refer [here](https://docs.nvidia.com/deploy/cuda-compatibility/index.html#binary-compatibility__table-toolkit-driver). 2. Ensure that the CUDA toolkit is installed and compatible with your NVIDIA driver. For a detailed of CUDA compatibility, please refer [here](https://docs.nvidia.com/deploy/cuda-compatibility/index.html#binary-compatibility__table-toolkit-driver). diff --git a/extensions/inference-nitro-extension/bin/version.txt b/extensions/inference-nitro-extension/bin/version.txt index b0032849c8..a45be46276 100644 --- a/extensions/inference-nitro-extension/bin/version.txt +++ b/extensions/inference-nitro-extension/bin/version.txt @@ -1 +1 @@ -0.2.7 +0.2.8 diff --git a/extensions/inference-nitro-extension/download.bat b/extensions/inference-nitro-extension/download.bat index f82b49c2ea..22e1c85b35 100644 --- a/extensions/inference-nitro-extension/download.bat +++ b/extensions/inference-nitro-extension/download.bat @@ -1,3 +1,3 @@ @echo off set /p NITRO_VERSION=<./bin/version.txt -.\node_modules\.bin\download https://github.com/janhq/nitro/releases/download/v%NITRO_VERSION%/nitro-%NITRO_VERSION%-win-amd64-cuda-12-0.tar.gz -e --strip 1 -o ./bin/win-cuda-12-0 && .\node_modules\.bin\download https://github.com/janhq/nitro/releases/download/v%NITRO_VERSION%/nitro-%NITRO_VERSION%-win-amd64-cuda-11-4.tar.gz -e --strip 1 -o ./bin/win-cuda-11-4 && .\node_modules\.bin\download https://github.com/janhq/nitro/releases/download/v%NITRO_VERSION%/nitro-%NITRO_VERSION%-win-amd64.tar.gz -e --strip 1 -o ./bin/win-cpu +.\node_modules\.bin\download https://github.com/janhq/nitro/releases/download/v%NITRO_VERSION%/nitro-%NITRO_VERSION%-win-amd64-cuda-12-0.tar.gz -e --strip 1 -o ./bin/win-cuda-12-0 && .\node_modules\.bin\download https://github.com/janhq/nitro/releases/download/v%NITRO_VERSION%/nitro-%NITRO_VERSION%-win-amd64-cuda-11-7.tar.gz -e --strip 1 -o ./bin/win-cuda-11-7 && .\node_modules\.bin\download https://github.com/janhq/nitro/releases/download/v%NITRO_VERSION%/nitro-%NITRO_VERSION%-win-amd64.tar.gz -e --strip 1 -o ./bin/win-cpu diff --git a/extensions/inference-nitro-extension/package.json b/extensions/inference-nitro-extension/package.json index 479cc51dcc..e9812e9710 100644 --- a/extensions/inference-nitro-extension/package.json +++ b/extensions/inference-nitro-extension/package.json @@ -8,7 +8,7 @@ "license": "AGPL-3.0", "scripts": { "build": "tsc -b . && webpack --config webpack.config.js", - "downloadnitro:linux": "NITRO_VERSION=$(cat ./bin/version.txt) && download https://github.com/janhq/nitro/releases/download/v${NITRO_VERSION}/nitro-${NITRO_VERSION}-linux-amd64.tar.gz -e --strip 1 -o ./bin/linux-cpu && chmod +x ./bin/linux-cpu/nitro && download https://github.com/janhq/nitro/releases/download/v${NITRO_VERSION}/nitro-${NITRO_VERSION}-linux-amd64-cuda-12-0.tar.gz -e --strip 1 -o ./bin/linux-cuda-12-0 && chmod +x ./bin/linux-cuda-12-0/nitro && download https://github.com/janhq/nitro/releases/download/v${NITRO_VERSION}/nitro-${NITRO_VERSION}-linux-amd64-cuda-11-4.tar.gz -e --strip 1 -o ./bin/linux-cuda-11-4 && chmod +x ./bin/linux-cuda-11-4/nitro", + "downloadnitro:linux": "NITRO_VERSION=$(cat ./bin/version.txt) && download https://github.com/janhq/nitro/releases/download/v${NITRO_VERSION}/nitro-${NITRO_VERSION}-linux-amd64.tar.gz -e --strip 1 -o ./bin/linux-cpu && chmod +x ./bin/linux-cpu/nitro && download https://github.com/janhq/nitro/releases/download/v${NITRO_VERSION}/nitro-${NITRO_VERSION}-linux-amd64-cuda-12-0.tar.gz -e --strip 1 -o ./bin/linux-cuda-12-0 && chmod +x ./bin/linux-cuda-12-0/nitro && download https://github.com/janhq/nitro/releases/download/v${NITRO_VERSION}/nitro-${NITRO_VERSION}-linux-amd64-cuda-11-7.tar.gz -e --strip 1 -o ./bin/linux-cuda-11-7 && chmod +x ./bin/linux-cuda-11-7/nitro", "downloadnitro:darwin": "NITRO_VERSION=$(cat ./bin/version.txt) && download https://github.com/janhq/nitro/releases/download/v${NITRO_VERSION}/nitro-${NITRO_VERSION}-mac-arm64.tar.gz -e --strip 1 -o ./bin/mac-arm64 && chmod +x ./bin/mac-arm64/nitro && download https://github.com/janhq/nitro/releases/download/v${NITRO_VERSION}/nitro-${NITRO_VERSION}-mac-amd64.tar.gz -e --strip 1 -o ./bin/mac-x64 && chmod +x ./bin/mac-x64/nitro", "downloadnitro:win32": "download.bat", "downloadnitro": "run-script-os", diff --git a/extensions/inference-nitro-extension/src/module.ts b/extensions/inference-nitro-extension/src/module.ts index 3654410d46..776de20785 100644 --- a/extensions/inference-nitro-extension/src/module.ts +++ b/extensions/inference-nitro-extension/src/module.ts @@ -395,7 +395,7 @@ function spawnNitroProcess(nitroResourceProbe: any): Promise { if (nvidiaInfo["cuda"].version === "12") { binaryFolder = path.join(binaryFolder, "win-cuda-12-0"); } else { - binaryFolder = path.join(binaryFolder, "win-cuda-11-4"); + binaryFolder = path.join(binaryFolder, "win-cuda-11-7"); } cudaVisibleDevices = nvidiaInfo["gpu_highest_vram"]; } @@ -415,7 +415,7 @@ function spawnNitroProcess(nitroResourceProbe: any): Promise { if (nvidiaInfo["cuda"].version === "12") { binaryFolder = path.join(binaryFolder, "linux-cuda-12-0"); } else { - binaryFolder = path.join(binaryFolder, "linux-cuda-11-4"); + binaryFolder = path.join(binaryFolder, "linux-cuda-11-7"); } cudaVisibleDevices = nvidiaInfo["gpu_highest_vram"]; }