{"id":23288545,"url":"https://github.com/kernferm/nvidia-installation-guide","last_synced_at":"2025-04-06T16:33:03.502Z","repository":{"id":258470623,"uuid":"859569789","full_name":"KernFerm/nvidia-installation-guide","owner":"KernFerm","description":"This guide walks you through installing NVIDIA CUDA Toolkit 11.8, cuDNN, and TensorRT on Windows, including setting up Python packages like Cupy and TensorRT. It ensures proper system configuration for CUDA development, with steps for setting environment variables and verifying installation via cmd.exe","archived":false,"fork":false,"pushed_at":"2024-10-24T06:53:05.000Z","size":47,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-12T22:29:04.000Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Batchfile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/KernFerm.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-09-18T22:27:17.000Z","updated_at":"2025-01-31T17:33:13.000Z","dependencies_parsed_at":"2024-10-21T16:37:19.213Z","dependency_job_id":null,"html_url":"https://github.com/KernFerm/nvidia-installation-guide","commit_stats":null,"previous_names":["kernferm/nvidia-installation-guide"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KernFerm%2Fnvidia-installation-guide","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KernFerm%2Fnvidia-installation-guide/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KernFerm%2Fnvidia-installation-guide/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KernFerm%2Fnvidia-installation-guide/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/KernFerm","download_url":"https://codeload.github.com/KernFerm/nvidia-installation-guide/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247512724,"owners_count":20950910,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-20T03:20:35.930Z","updated_at":"2025-04-06T16:33:03.476Z","avatar_url":"https://github.com/KernFerm.png","language":"Batchfile","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Support the Project ⭐\n\nIf you find this project useful, please give it a star! Your support is appreciated and helps keep the project growing. 🌟\n\n\n# 🚀 NVIDIA CUDA Installation Guide\n\nThis guide walks you through installing NVIDIA CUDA Toolkit 11.8, cuDNN, and TensorRT on Windows, including setting up Python packages like Cupy and TensorRT. It ensures proper system configuration for CUDA development, with steps for setting environment variables and verifying installation via cmd.exe\n\n### 1. **Download the NVIDIA CUDA Toolkit 11.8**\n\nFirst, download the CUDA Toolkit 11.8 from the official NVIDIA website:\n\n👉 [Nvidia CUDA Toolkit 11.8 - DOWNLOAD HERE](https://developer.nvidia.com/cuda-11-8-0-download-archive)\n\n### 2. **Install the CUDA Toolkit**\n\n- After downloading, open the installer (`.exe`) and follow the instructions provided by the installer.\n- Make sure to select the following components during installation:\n  - CUDA Toolkit\n  - CUDA Samples\n  - CUDA Documentation (optional)\n\n### 3. **Verify the Installation**\n\n- After the installation completes, open the `cmd.exe` terminal and run the following command to ensure that CUDA has been installed correctly:\n  ```\n  nvcc --version\n  ```\nThis will display the installed CUDA version.\n\n### **4. Install Cupy**\nRun the following command in your terminal to install Cupy:\n  ```\n  pip install cupy-cuda11x\n  ```\n\n## 5. CUDNN Installation 🧩\nDownload cuDNN (CUDA Deep Neural Network library) from the NVIDIA website:\n\n👉 [Download CUDNN](https://developer.nvidia.com/downloads/compute/cudnn/secure/8.9.6/local_installers/11.x/cudnn-windows-x86_64-8.9.6.50_cuda11-archive.zip/). (Requires an NVIDIA account – it's free).\n\n## 6. Unzip and Relocate 📁➡️\nOpen the `.zip` cuDNN file and move all the folders/files to the location where the CUDA Toolkit is installed on your machine, typically:\n\n```\nC:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v11.8\n```\n\n\n## 7. Get TensorRT 8.6 GA 🔽\nDownload [TensorRT 8.6 GA](https://developer.nvidia.com/downloads/compute/machine-learning/tensorrt/secure/8.6.1/zip/TensorRT-8.6.1.6.Windows10.x86_64.cuda-11.8.zip).\n\n## 8. Unzip and Relocate 📁➡️\nOpen the `.zip` TensorRT file and move all the folders/files to the CUDA Toolkit folder, typically located at:\n\n```\nC:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v11.8\n```\n\n\n## 9. Python TensorRT Installation 🎡\nOnce all the files are copied, run the following command to install TensorRT for Python:\n\n```\npip install \"C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v11.8\\python\\tensorrt-8.6.1-cp311-none-win_amd64.whl\"\n```\n\n🚨 **Note:** If this step doesn’t work, double-check that the `.whl` file matches your Python version (e.g., `cp311` is for Python 3.11). Just locate the correct `.whl` file in the `python` folder and replace the path accordingly.\n\n## 10. Set Your Environment Variables 🌎\nAdd the following paths to your environment variables:\n\n```\nC:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v11.8\\lib\nC:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v11.8\\libnvvp\nC:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v11.8\\bin\n```\n\n# Setting Up CUDA 11.8 with cuDNN on Windows\n\nOnce you have CUDA 11.8 installed and cuDNN properly configured, you need to set up your environment via `cmd.exe` to ensure that the system uses the correct version of CUDA (especially if multiple CUDA versions are installed).\n\n## Steps to Set Up CUDA 11.8 Using `cmd.exe`\n\n### 1. Set the CUDA Path in `cmd.exe`\n\nYou need to add the CUDA 11.8 binaries to the environment variables in the current `cmd.exe` session.\n\nOpen `cmd.exe` and run the following commands:\n\n```\nset PATH=C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v11.8\\bin;%PATH%\nset PATH=C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v11.8\\libnvvp;%PATH%\nset PATH=C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v11.8\\extras\\CUPTI\\lib64;%PATH%\n```\nThese commands add the CUDA 11.8 binary, lib, and CUPTI paths to your system's current session. Adjust the paths as necessary depending on your installation directory.\n\n2. Verify the CUDA Version\nAfter setting the paths, you can verify that your system is using CUDA 11.8 by running:\n```\nnvcc --version\n```\nThis should display the details of CUDA 11.8. If it shows a different version, check the paths and ensure the proper version is set.\n\n3. **Set the Environment Variables for a Persistent Session**\nIf you want to ensure CUDA 11.8 is used every time you open `cmd.exe`, you can add these paths to your system environment variables permanently:\n\n1. Open `Control Panel` -\u003e `System` -\u003e `Advanced System Settings`.\nClick on `Environment Variables`.\nUnder `System variables`, select `Path` and click `Edit`.\nAdd the following entries at the top of the list:\n```\nC:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v11.8\\bin\nC:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v11.8\\libnvvp\nC:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v11.8\\extras\\CUPTI\\lib64\n```\nThis ensures that CUDA 11.8 is prioritized when running CUDA applications, even on systems with multiple CUDA versions.\n\n4. **Set CUDA Environment Variables for cuDNN**\nIf you're using cuDNN, ensure the `cudnn64_8.dll` is also in your system path:\n```\nset PATH=C:\\tools\\cuda\\bin;%PATH%\n```\nThis should properly set up CUDA 11.8 to be used for your projects via `cmd.exe`.\n\n### Environmental Variable Setup\n\n![pic](https://github.com/KernFerm/v7yw9N8TL/blob/main/Environtmental_Setup/pic.png)\n\n```\nimport torch\n\nprint(torch.cuda.is_available())  # This will return True if CUDA is available\nprint(torch.version.cuda)  # This will print the CUDA version being used\nprint(torch.cuda.get_device_name(0))  # This will print the name of the GPU, e.g., 'NVIDIA GeForce RTX GPU Model'\n```\nrun the `get_device.py` to see if you installed it correctly \n\n## Cuda Requirements\n- run the `cuda-requirements.bat` after you get done with installion of nvidia.\n\n```\n@echo off\n:: Batch script to install Python packages for CUDA 11.8 environment\n\necho MAKE SURE TO HAVE THE WHL DOWNLOADED BEFORE YOU CONTINUE!!!\npause\necho Click the link to download the WHL: press ctrl then left click with mouse\necho https://github.com/cupy/cupy/releases/download/v12.0.0b1/cupy_cuda11x-12.0.0b1-cp311-cp311-win_amd64.whl\npause\n\necho Installing CuPy from WHL...\npip install https://github.com/cupy/cupy/releases/download/v12.0.0b1/cupy_cuda11x-12.0.0b1-cp311-cp311-win_amd64.whl\necho Press enter to continue with the rest of the dependency installs\npause\n\necho Installing ONNX Runtime with GPU support...\npip install onnxruntime-gpu==1.19.2\necho Press enter to continue with the rest of the dependency installs\npause\n\necho Installing NVIDIA PyIndex...\npip install nvidia-pyindex\necho Press enter to continue with the rest of the dependency installs\npause\n\necho Installing cuDNN for CUDA 11.8...\npip install nvidia-cudnn-cu11==8.6.0.163\necho Press enter to continue with the rest of the dependency installs\npause\n\necho Installing TensorRT for CUDA 11.8...\npip install nvidia-tensorrt==8.6.1\necho Press enter to continue with the rest of the dependency installs\npause\n\necho Installing NumPy...\npip install numpy\necho Press enter to continue with the rest of the dependency installs\npause\n\necho Installing cupy-cuda11x...\npip install cupy-cuda11x\necho Press enter to continue with the rest of the dependency installs\npause\n\necho All packages installed successfully!\npause\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkernferm%2Fnvidia-installation-guide","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkernferm%2Fnvidia-installation-guide","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkernferm%2Fnvidia-installation-guide/lists"}