DEV Community

Cover image for Zero to AI-Ready PC in One Click: Windows & Ubuntu AI Requirements Installer Full Tutorial
Furkan Gözükara
Furkan Gözükara

Posted on

Zero to AI-Ready PC in One Click: Windows & Ubuntu AI Requirements Installer Full Tutorial

Zero to AI-Ready PC in One Click: Windows & Ubuntu AI Requirements Installer Full Tutorial

Full tutorial link > https://www.youtube.com/watch?v=ptuLL0C72Ms

Full tutorial: Windows and Ubuntu AI Requirements Installers

The 1-Click Windows and Ubuntu AI Requirements Installers set up your PC for AI apps such as ComfyUI, SwarmUI, music, text-to-speech and text-to-3D tools: one click on Windows, one command on Ubuntu. They install the latest NVIDIA driver, CUDA 12.9 + 13.2, cuDNN 9.20, Python 3.10-3.14, the C++ build tools, Git, Node.js, .NET SDK and FFmpeg, set PATH in the right order, test everything for real (78 Windows and 66 Ubuntu tests passed on our test PCs) and show every result in a detailed HTML report.

Links:

Use the chapters to jump to the download, the Windows steps, the HTML report, the Ubuntu installer and updates.

Chapters:

  • 00:00:00 One click sets up your PC for AI: all tests passed
  • 00:00:17 Windows 10, 11 and Ubuntu 22, 24, 26: ready for any AI app
  • 00:01:03 Download the latest zip and extract it in Downloads
  • 00:01:19 Right-click the .bat and choose Run as administrator
  • 00:01:38 The 20 steps begin: long paths, Store Python removed
  • 00:01:50 CUDA 12.9 + 13.2 toolkits, then cuDNN for PyTorch
  • 00:02:14 Visual Studio 2022 Build Tools and the VC++ runtime
  • 00:02:43 Python 3.10 to 3.14, with 3.12 as the default
  • 00:03:12 Git, Node.js 24, .NET SDK and FFmpeg
  • 00:03:48 PATH order, Git long paths and the page file
  • 00:04:09 Triton cache, NVIDIA driver and the final tests
  • 00:04:32 The HTML report: 78 tests, every step, PATH and backups
  • 00:05:13 Transparent source files, logs.txt, then restart Windows
  • 00:06:05 Ubuntu 22.04, 24.04, 26.04: one sudo command
  • 00:07:00 Rerun any time to update; GCC, Clang, CMake, Ninja
  • 00:07:46 Ubuntu report: OK messages, warnings and logs.txt
  • 00:08:54 One-time setup, ready for our apps and other AI apps
  • 00:09:30 Latest installer version, the guide post and support

What it installs on Windows: the latest compatible NVIDIA WHQL driver for GeForce RTX 20-series and newer (checked on every run, never downgraded); Python 3.10 to 3.14 for all users, 3.12 as default; CUDA 12.9 and 13.2 side by side (13.2 default) and cuDNN 9.20, the only cuDNN registered, so PyTorch never mixes two versions; Visual Studio 2022 Build Tools (MSVC, Windows SDK) that keep compiling after Visual Studio updates, the latest Visual C++ runtime and CUDA integration; Git, Node.js 24, .NET 10 SDK for SwarmUI, FFmpeg 9 shared and static; PATH in the right order with your own entries kept, long paths, a 100 GB page file. Ready for torch.compile, Triton and flash-attention, sage-attention, xformers and insightface builds.

On Ubuntu the C++ tools are GCC, Clang, CMake and Ninja, plus Git LFS, uv, free-threaded Python 3.13t and 3.14t and a swap file. With an NVIDIA GPU it installs the newest driver Ubuntu offers and never downgrades it. Ubuntu's own python3 stays as it is.

Windows: put the zip in Downloads (not directly on C:), extract it, right-click Windows_AI_Requirements_Installer.bat and choose Run as administrator. Nothing has to be installed first. Ubuntu: open a terminal in the folder and run sudo bash ./Ubuntu_AI_Requirements_Installer.sh (24.04 recommended).

Afterwards the HTML report opens and logs.txt is saved next to the installer. Restart your PC and open a new terminal for the new PATH. You need this setup only once, not for every app. When the post shows a newer version, run the new one: finished parts are only checked, failed parts are repaired and components are updated, with backups first (--restore-env puts them back).

Tested for real: the tests compile and start C++ and CUDA programs, build Python and PyTorch-style CUDA extensions, compile GPU code for RTX 50 cards, encode a video and build a .NET app, in the environment a new terminal gets; the optional PyTorch GPU test runs with --torch-test. Supported: Windows 10 (21H2+) and 11; Ubuntu 22.04, 24.04 and 26.04 (desktop, server, cloud GPU, WSL2, Linux Mint, Zorin OS), 64-bit x86. Without an NVIDIA GPU everything still installs and compiling works; CUDA apps need an NVIDIA GPU.

This video is for anyone who wants to run AI apps locally without installing CUDA, Python and C++ tools by hand.

For support, questions or installation issues, check the links above, the pinned comment, Patreon, Discord and the video comments, and send your logs.txt if a step fails. Thank you for watching.

1-Click Windows and Linux (Ubuntu 22, 24, 26) AI Requirements Installers - Setup Your PC and Make It Ready for All Local AI Apps, Scripts, and More

https://www.patreon.com/SECourses/posts/1-click-windows-172290854

Our AI Requirements Installers set up a Windows or Ubuntu PC for all our AI apps: one click on Windows, one command on Ubuntu. They install the latest NVIDIA driver, Python 3.10 to 3.14, CUDA 12.9 and 13.2, cuDNN 9.20, the C++ compilers, Git, Node.js, .NET and FFmpeg, set every path and variable, test everything for real and show the result in a clear report. Below you will see the real reports of a Windows 11 PC with an RTX 3090 Ti and a fresh Ubuntu 24.04 PC.

  • This installer will get updated as needed like when we move to Torch 2.14 and CUDA 13.4.
  • I have been constantly getting asked how to make initial setup easy and here you have it.
  • Once you run this installers, your PC will be fully ready to run all of our AI apps with perfect speed, accuracy and quality.
  • For Windows, recommend version is Windows 11 but should work both Windows 10 and 11
  • For Ubuntu, recommended version is Ubuntu 24 but should work both Ubuntu 22 and 26 too
  • You can run multiple times with no issues if first install fails for any reason, don't forget to restart system after running installation
  • This is only app that you need to run as administrator do not forget

    • All of my other apps, scripts, installers are run with double click or select and hit enter
  • Older manual installation : https://youtu.be/DrhUHnYfwC0

AI Requirements Installers

Why Our AI Requirements Installers

  • One click on Windows, one command on Ubuntu: right-click the .bat and choose Run as administrator, or run one sudo command in a terminal. Nothing has to be installed first.
  • Made for our apps and their full features: ComfyUI, SwarmUI, SECourses Musubi Trainer, AI Toolkit, Ultimate TTS, Premium Upscaler Pro, Video Captioner Pro and more, with torch.compile, Triton, flash-attention, sage-attention, xformers and insightface builds.
  • The latest NVIDIA driver: Windows gets the newest compatible WHQL driver for GeForce RTX 20-series and newer cards, checked with NVIDIA on every run. Ubuntu gets the newest driver Ubuntu offers, R595 or newer. The driver step runs last, and a working driver is never downgraded.

  • Several versions side by side: Python 3.10, 3.11, 3.12, 3.13 and 3.14 with 3.12 as the default, and CUDA 12.9 and 13.2 with 13.2 as the default. Ubuntu also gets the free-threaded Python 3.13t and 3.14t.

  • Tested for real: 78 tests on Windows and 66 on Ubuntu compile and start C++ and CUDA programs, build Python and CUDA extensions, encode a video and build a .NET app, in the same environment that a new terminal gets. On the RTX 3090 Ti, the CUDA test programs ran on the GPU with correct results.

  • Fast: the Windows 11 PC with the RTX 3090 Ti was installed, updated and tested in 20 minutes 45 seconds, with the CUDA and cuDNN installers already downloaded by an earlier run.

  • Made for PCs that already have tools: an existing Visual Studio is updated, a current Visual C++ runtime is left alone, and an older Python from the Python Install Manager is backed up while its virtual environments keep working.

  • A clear HTML report: every component, step, path, variable, test, download and backup on one page, opened in your browser at the end.

  • The right cuDNN every time: only cuDNN 9.20 for CUDA 13 is registered, so PyTorch always loads one matching cuDNN.

  • Ready after updates and in every terminal: compiling keeps working after Visual Studio updates on Windows, and on Ubuntu every new terminal is ready, bash, zsh and login shells included.

  • Safe on your PC: every change is backed up first and one command restores it. Ubuntu's own Python stays as it is.

  • Run it again any time: finished parts are only checked, failed or interrupted parts are repaired, and components and the NVIDIA driver are updated.

Here are both reports right after the installation:

Windows and Ubuntu AI Requirements Installer reports: everything installed and verified, all 78 and all 66 tests passed

1 and 3: everything installed and verified, every test passed. 2: the full installation time on the Windows 11 PC with the RTX 3090 Ti. Its CUDA and cuDNN installers were already downloaded by an earlier run.

What You Download

You get small script files. They download everything else and check each download.

The installer files: the Windows zip with the .bat, .py and instructions, the Ubuntu .sh and instructions

1: on Windows you start the .bat. It comes in Windows_AI_Requirements_Installer.zip together with Windows_AI_Requirements_Installer.py, which must stay in the same folder. 2: on Ubuntu you run the .sh. The two text files explain every step and option.

Windows AI Requirements Installer

How to Run It

Extract the zip, right-click Windows_AI_Requirements_Installer.bat and choose Run as administrator. A normal double-click works too: it asks Windows for administrator rights by itself. The .bat brings its own temporary portable Python from python.org, so nothing has to be installed first.

When it finishes, the HTML report opens in your browser and logs.txt is saved next to the .bat. Open a new Command Prompt or PowerShell window to use the new PATH. Windows is never restarted for you: restart it when the report asks, and if a new NVIDIA driver asked for the restart, run the installer again afterwards to finish the tests.

What It Installs

The report starts with every installed component, its version and its folder:

Windows report, Installed components: NVIDIA driver, Python 3.10 to 3.14, CUDA 12.9 and 13.2, cuDNN 9.20, Visual Studio 2022 Build Tools, Git, Node.js, .NET, FFmpeg and the page file

1: the latest NVIDIA WHQL driver, 617.42 on this PC. 2: Python 3.10 to 3.14 for all users in C:\Python310 to C:\Python314, and python, pip and py start Python 3.12. 3: CUDA 12.9 and 13.2 side by side with 13.2 as the default, and cuDNN 9.20. 4: FFmpeg 9 in a shared and a static build. 5: a 100 GB page file. You also get Visual Studio 2022 Build Tools with the MSVC C++ compilers and the Windows SDK, the latest Visual C++ runtime, Git, Node.js 24, the .NET 10 SDK for SwarmUI and Windows long paths.

20 Steps, Every One Timed

The Steps table shows each step with its status and time. Open the messages of any step to see exactly what it did:

Windows report, Steps: 20 steps, all OK, with the time of each step

On this Windows 11 PC with an RTX 3090 Ti, CUDA 12.9 and 13.2 took 5 minutes, updating its Visual Studio Build Tools 3 minutes and the five Python versions 5 minutes. PATH and the variables were backed up before they changed, the NVIDIA driver step ran last, and the tests took 1 minute 48 seconds. The CUDA installers leave out their bundled older display driver, because the driver has its own step.

The Latest NVIDIA Driver

The installer keeps your NVIDIA driver up to date. It runs as the last installation step, right before the tests:

Windows report, the NVIDIA driver step: the RTX 3090 Ti found, the newest WHQL driver looked up, nothing to install because it was already the newest

1: the driver comes after CUDA, cuDNN and every other part, so a driver restart never comes before the other installers. 2: it finds GeForce RTX 20-series and newer desktop and laptop cards by their hardware IDs, even with no driver installed yet. 3: it asks NVIDIA's live service for the newest compatible WHQL driver on every run, downloads the official NVIDIA-signed package and installs only the display driver. 4: a driver that is already the newest is kept, as here. Use --skip nvidia to keep your driver, or --only nvidia to update just the driver.

Made for PCs That Already Have Tools

This PC already had Visual Studio Build Tools, a .NET SDK and a Python 3.14 from the Python Install Manager. The installer worked with what was there:

Windows report, steps 6 to 9: existing Visual Studio updated, current Visual C++ runtime left alone, old Python 3.14 backed up and its virtual environments kept working

1: the existing Visual Studio Build Tools were updated to the latest 17.x. 2: the Visual C++ runtime was already current, so it was left alone. 3: the old Python 3.14 was unregistered with a backup, and py -3.14 now starts the new Python for all users. 4: a link keeps every existing virtual environment of the old Python working. The new .NET SDK was added next to the one already there.

PATH in the Right Order

The PATH order decides which Python, CUDA and cuDNN every app finds. The installer puts each folder at the top of the system and user PATH in the right order and shows the result in color:

Windows report, the new SYSTEM PATH order: cuDNN and CUDA first, Windows folders, Python 3.12 first, build paths, FFmpeg and the PC's own entries

Green entries were added, blue ones moved to the top, and white ones are your own entries, kept as they were. cuDNN and CUDA 13.2 come first, then the Windows system folders, then Python 3.12 and the other versions, the C++ build paths and the FFmpeg shared build. 7: the entries of your other programs stay after ours. Your PATH before the change is listed below the table.

Environment Variables

The installer sets the variables that compilers and PyTorch extension builds look for, and it shows each one before and after:

Windows report, environment variables before and after: CUDA_HOME, CUDNN_PATH, INCLUDE, LIB, LIBPATH and NVCC_APPEND_FLAGS

1: CUDA_HOME points to CUDA 13.2. 2: CUDNN_PATH points to the cuDNN 9.20 root that torch extension builds and CMake expect. 3: INCLUDE, LIB and LIBPATH make the C++ compiler work in every new terminal, like the Visual Studio developer prompt. 4: nvcc gets the flag it needs with the MSVC compiler. VSLANG keeps compiler messages in English for torch.compile, and values that were already correct stay unchanged.

Visual Studio Updates Keep Compiling Working

Visual Studio installs every compiler update into a new version folder. Our installer gives PATH, INCLUDE and LIB fixed paths that always lead to the current compiler and Windows SDK:

Windows report, version-independent build paths, the scheduled task that re-points them, and the page file on the fastest of three drives

1: a fixed path leads to today's MSVC version. 2: a scheduled task points the paths at the new version at startup, at logon, after Visual Studio updates and every day, so open terminals keep working. 3: the 100 GB page file goes on the fastest suitable drive, chosen here from three drives.

78 Tests, Run for Real

At the end, the installer tests everything with exactly the PATH and variables that a new terminal or app gets:

Windows report, tests: 78 of 78 passed, and the PATH order tests for nvcc, cuDNN, cl and ffmpeg

All 78 tests passed. The first group checks that every command finds the right program: nvcc finds CUDA 13.2, cuDNN for CUDA 13 comes first, cl is the MSVC compiler, ffmpeg is the shared build, and the Windows system folders stay in front.

Every Python version is started and checked:

Windows report, Python tests: nvitop, py -0p, and for each version ssl, sqlite3, ctypes, tkinter, venv, pip, headers and libraries

Each version runs with ssl, sqlite3, ctypes and tkinter, creates a virtual environment and runs pip in it, and has the headers and libraries that compiling extensions needs. The nvitop GPU monitor is installed too.

CUDA 12.9 and CUDA 13.2 are tested the way PyTorch uses them:

Windows report, CUDA and cuDNN tests: CUDA programs run on the GPU with correct results, Thrust and CUB, RTX 50xx code, NVRTC and cuDNN loading

The tests compile, link and start a CUDA program, and on the RTX 3090 Ti its GPU result was correct with both CUDA versions. They compile the Thrust and CUB code that PyTorch extensions use, compile GPU code for RTX 50xx (Blackwell) cards and compile a kernel at run time with NVRTC. cuDNN is built into a C++ program and loads the way onnxruntime and insightface load it.

The C++ tests build what torch.compile, Triton and pip build on your PC:

Windows report, C++ compiler tests: English messages, Visual Studio updates, OpenMP, Python and CUDA extensions, CMake and Ninja

An OpenMP library is built and loaded from Python, like torch.compile does on the CPU. A Python C extension is built the way pip builds insightface. CUDA 12.9 and CUDA 13.2 extensions are built with the compiler that PyTorch picks, the same way flash-attention and xformers are built. CMake and Ninja projects build too, and their CUDA programs ran on the GPU with correct results.

The last groups test FFmpeg, Git, Node.js, .NET and Windows itself:

Windows report, FFmpeg, Git, Node.js, .NET and Windows tests

FFmpeg encodes a test video and reads it back, and its DLLs load the way torchcodec and torchaudio look for them. A .NET console app is created, built and run, as SwarmUI needs. A file path longer than 260 characters works, and the 100 GB page file is set.

Checked Downloads and Backups

Every download is checked before it is used, and every change is backed up first:

Windows report, downloads with signature and integrity checks, files and backups

1: every installer must carry a valid digital signature from NVIDIA, Microsoft, the Python Software Foundation or its other publisher. 2: archives pass an integrity check. 3: send us logs.txt when you ask for help. 4: the backup folder holds HOW_TO_RESTORE.txt. 5: one command puts PATH and every variable back.

Windows Options

  • --dry-run: shows the plan and changes nothing.
  • --only nvidia: checks for and installs just the latest compatible NVIDIA driver.
  • --skip nvidia: keeps your current driver during a full installation.
  • --only env,verify: runs only the steps you name. --skip skips steps, and --list-steps lists them.
  • --torch-test: installs PyTorch 2.13 with CUDA 13 in a temporary environment and runs real cuDNN convolution and BLAS tests on your NVIDIA GPU.
  • --restore-env "backup folder": puts PATH and the variables back from a backup.
  • --no-browser: keeps the report from opening automatically.

Pass them to the .bat from a terminal, for example:

Windows_AI_Requirements_Installer.bat --dry-run
Enter fullscreen mode Exit fullscreen mode

Ubuntu AI Requirements Installer

How to Run It

It works on Ubuntu 22.04, 24.04 and 26.04 LTS: desktop, server, cloud GPU machines and WSL2, and on systems based on them such as Linux Mint and Zorin OS (64-bit x86). Put Ubuntu_AI_Requirements_Installer.sh into a folder, open a terminal there and run:

sudo bash ./Ubuntu_AI_Requirements_Installer.sh
Enter fullscreen mode Exit fullscreen mode

Enter your password, and the rest is automatic. At the end, the HTML report opens in your browser, and the report and logs.txt are saved next to the .sh file. Open a new terminal afterwards, and restart Ubuntu when the report asks for it after a new NVIDIA driver. The installation keeps running even if you close the terminal.

What It Installs

The Ubuntu report starts with the same overview:

Ubuntu report, Installed components: Python 3.10 to 3.14 and 3.13t, 3.14t, CUDA 12.9 and 13.2, cuDNN 9.20, compilers, Git, Node.js, .NET, FFmpeg, uv and swap

1: Python 3.10 to 3.14 and the free-threaded 3.13t and 3.14t. python and py start Python 3.12, and Ubuntu's own python3 stays as it is. 2: CUDA 12.9 and 13.2 with cuDNN 9.20 for CUDA 13 (CUDA 13.4 on Ubuntu 26.04). 3: FFmpeg 9 in a static and a shared build. 4: a swap file for 100 GB of swap in total. GCC, Clang, CMake, Ninja, Git with Git LFS, Node.js 24, the .NET 10 SDK and uv come too.

17 Steps, the NVIDIA Driver Last

Each step is listed with its time:

Ubuntu report, Steps: 17 steps, all OK, with the time of each step and the NVIDIA driver step last

The installer first repairs the package system and adds the software sources for CUDA, Python and Node.js. On our fresh PC, the seven Python versions took 43 seconds and the tests 28 seconds. You also get aria2, 7-Zip, unrar, nvtop, htop and cloudflared for the apps' share links.

On a PC with an NVIDIA GPU, the driver step installs the newest driver that Ubuntu offers for the card, R595 or newer (R615 on Ubuntu 26.04), with open kernel modules from Ubuntu's signed packages. It upgrades the driver again on every run, never downgrades it, and gives RTX 50 (Blackwell) cards the open kernel module they need. It runs last, right before the tests.

Ready in Every New Terminal

The environment is written once for all users and loaded by every kind of terminal:

Ubuntu report, environment for every new terminal: profile file, variables for all users and use-cuda 12.9

1: login shells, bash and zsh all load it. 2: use-cuda 12.9 switches one terminal to CUDA 12.9 when you need it. 3: CUDA_HOME, CUDA_PATH, CUDNN_PATH and the CUDA tools in PATH are set for all users. 4: this file is what every new terminal loads. The libraries are registered system wide, so no LD_LIBRARY_PATH is needed, and lines in ~/.bashrc and similar files that switch to another CUDA version are removed with a backup.

66 Tests, Run as You

Every test runs as your user with exactly the environment that a new terminal gets:

Ubuntu report, tests: 66 of 66 passed, and the Python tests for each version

All 66 tests passed. Each Python version runs with ssl, sqlite3, lzma, readline and tkinter, creates a virtual environment with pip and compiles a C extension.

The CUDA tests build and start programs with both CUDA versions:

Ubuntu report, CUDA and cuDNN tests: build and start CUDA programs, RTX 50xx code, use-cuda 12.9 and library registration

They compile the Thrust and CUB code of PyTorch extensions and GPU code for RTX 50xx (Blackwell) cards, check that use-cuda 12.9 switches a terminal and back, and check that every program finds the CUDA and cuDNN libraries by name, like ONNX Runtime does.

Then come the C++ and FFmpeg tests:

Ubuntu report, C++ compiler and FFmpeg tests: GCC, Clang, OpenMP, Triton-style launcher, CMake, Ninja and FFmpeg encoders

GCC and Clang compile C++17, an OpenMP library is built and loaded like torch.compile does on the CPU, and a GPU launcher is built the way Triton compiles one at run time. FFmpeg encodes a test video and offers the x264, x265, SVT-AV1, VP9 and NVENC encoders. Its shared libraries are found the way TorchCodec looks for them, and the files for building PyAV and decord are in place.

The last groups check the tools and your own terminal:

Ubuntu report, Git, Node.js, .NET, tools and system tests

Git LFS, Node.js, .NET, aria2c, 7-Zip, unrar, jq, cloudflared, nvtop and htop all work, and a .NET app builds as SwarmUI needs. Your own terminal uses CUDA 13.2, and your ~/.bashrc, conda or pyenv settings keep the installed tools in reach.

Before and After, Downloads and Backups

The end of the report shows what changed and where everything is:

Ubuntu report, before and after, downloads with SHA-256 checks, APT packages, files and backups

1: a fresh Ubuntu before, everything installed after. 2: every download is checked, the archives with SHA-256. 3: every APT package of the run is listed. 4: every changed file is backed up with HOW_TO_RESTORE.txt. 5: one command restores the files, and another removes what the installer added.

Ubuntu Options

  • --yes: starts without a question, for scripts and cloud machines.
  • --dry-run: shows the plan without changing packages or settings.
  • --skip and --only: skip steps or run only some, for example --skip nvidia keeps your driver (--list-steps lists them).
  • --swap-gb 32: sets the size of the swap file (0 = no swap file).
  • --torch-test: tests PyTorch 2.13 with CUDA 13 in a temporary environment: cuDNN convolution, BLAS, loaded libraries and torch.compile.
  • --repair: after a power loss or crash, checks every installed package and reinstalls damaged ones.
  • --restore-env "backup folder": puts back the files it changed.
  • --uninstall: removes what the installer added outside of APT.

Example:

sudo bash ./Ubuntu_AI_Requirements_Installer.sh --yes --skip swap
Enter fullscreen mode Exit fullscreen mode

Run It Again Any Time

Both installers are made to run again and again. Finished parts are only checked, failed or interrupted parts are retried and repaired, and components are updated to the versions in the installer. The NVIDIA driver is checked again on every run, too. Run the newest installer whenever you download it, and your PC stays ready for our newest apps.

Top comments (0)