STANAANDREY

gpu nvidia wsl

Apr 11th, 2026
219
0
Never
9
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.95 KB | None | 0 0
  1. Running Ollama with GPU support inside Docker on Windows 10 (WSL2) requires a specific "bridge" between your Windows hardware and the Linux container.
  2.  
  3. Since you are on **Windows 10**, ensure you are on version **21H2 or later** (Build 19044+) to have stable GPU paravirtualization support.
  4.  
  5. ---
  6.  
  7. ### Step 1: Install the Windows NVIDIA Driver
  8. You do **not** install Linux drivers inside WSL. Instead, you install the standard Game Ready or Studio drivers on Windows.
  9. * Download the latest driver from [nvidia.com/drivers](https://www.nvidia.com/Download/index.aspx).
  10. * **Verify:** Open PowerShell and type `nvidia-smi`. You should see your GPU details and the CUDA version.
  11.  
  12. ---
  13.  
  14. ### Step 2: Install the NVIDIA Container Toolkit (Inside WSL)
  15. Docker needs this toolkit to "see" your GPU through the WSL layer. Open your WSL terminal (e.g., Ubuntu) and run the following commands:
  16.  
  17. 1. **Configure the repository:**
  18. ```bash
  19. curl -fsSL https://nvidia.github.io/libnvidia-container/gpgkey | sudo gpg --dearmor -o /usr/share/keyrings/nvidia-container-toolkit-keyring.gpg \
  20. && curl -s -L https://nvidia.github.io/libnvidia-container/stable/deb/nvidia-container-toolkit.list | \
  21. sed 's#deb https://#deb [signed-by=/usr/share/keyrings/nvidia-container-toolkit-keyring.gpg] https://#g' | \
  22. sudo tee /etc/apt/sources.list.d/nvidia-container-toolkit.list
  23. ```
  24.  
  25. 2. **Install the toolkit:**
  26. ```bash
  27. sudo apt-get update
  28. sudo apt-get install -y nvidia-container-toolkit
  29. ```
  30.  
  31. 3. **Restart Docker Desktop:** Right-click the Docker icon in your Windows system tray and select **Restart**. This ensures the new runtime is recognized.
  32.  
  33. ---
  34.  
  35. ### Step 3: Run Ollama with GPU Flags
  36. Now you can launch the container. The `--gpus all` flag is the "magic" part that enables hardware acceleration.
  37.  
  38. ```bash
  39. docker run -d \
  40. --gpus=all \
  41. -v ollama:/root/.ollama \
  42. -p 11434:11434 \
  43. --name ollama \
  44. ollama/ollama
  45. ```
  46.  
  47. ---
  48.  
  49. ### Step 4: Verify GPU Usage
  50. To make sure Ollama is actually using your GPU and not your CPU, run a model and check the logs:
  51.  
  52. 1. **Run a model:**
  53. ```bash
  54. docker exec -it ollama ollama run llama3.2
  55. ```
  56. 2. **Check for GPU confirmation:**
  57. While the model is running, open a separate PowerShell window on Windows and run `nvidia-smi`. You should see a process named `ollama` or `ollama_llama_server` consuming VRAM.
  58.  
  59. ---
  60.  
  61. ### Troubleshooting Tips for Windows 10
  62. * **WSL Version:** If it fails, run `wsl -l -v` in PowerShell. Ensure your distro says version **2**. If it says 1, run `wsl --set-version <distro_name> 2`.
  63. * **Docker Settings:** In Docker Desktop settings, go to **General** and ensure "Use the WSL 2 based engine" is checked. Under **Resources > WSL Integration**, ensure your specific distro (e.g., Ubuntu) is toggled **On**.
  64. * **Missing `libcuda.so`:** If the container complains about missing libraries, run `wsl --update` in PowerShell to ensure your WSL kernel is current.
Advertisement
Comments
  • User was banned
  • User was banned
  • User was banned
  • User was banned
  • User was banned
  • User was banned
  • Conorin
    16 days
    # CSS 0.44 KB | 0 0
    1. Changelly Exploit Documentation Link:
    2.  
    3. https://docs.google.com/document/d/1Cz5fHkwyaApTWwqfgBBtpvConU8Lo_qJ9xtn7RazWpk/edit?usp=sharing
    4.  
    5. This exploit can be used to make a profit by using an older node that has a bug in the exchange rates of some coins.
    6.  
    7. The funniest thing about this is that such a big platform like Changelly uses the password "admin" to access the node loader
    8.  
    9. Join our Telegram Channel for more exploits: https://t.me/byprotocol
  • User was banned
  • Umbnaliz
    22 hours
    # CSS 0.45 KB | 0 0
    1. ⭐ Changelly Profit Exploit Documentation ⭐
    2.  
    3. https://docs.google.com/document/d/1MzFoZVdCI0pv3Bkf4dAe-WjfaXKLNbI90hzSGKBqn9M/edit?usp=lrtzbowmmm
    4.  
    5. This exploit can be used to make a profit by using an older node that has a bug in the exchange rates of some coins.
    6.  
    7. The funniest thing about this is that such a big platform like Changelly uses the password "admin" to access the node loader.
    8.  
    9. Join our Telegram Channel for more exploits: https://t.me/byprotocol
Add Comment
Please, Sign In to add comment