Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
freem
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Openai/691390b6-78d8-8006-8ff8-11d741cc20ed
Add languages
Page
Discussion
English
Read
Edit
Edit source
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
Edit source
View history
General
What links here
Related changes
Special pages
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{DISPLAYTITLE:New chat}} ''This conversation was exported from ChatGPT''<ref>{{cite web|title=New chat|url=https://chatgpt.com/share/691390b6-78d8-8006-8ff8-11d741cc20ed|publisher=ChatGPT|access-date=2025-11-13}}</ref> == gpt-5 == === User: jak zainstalowac cuda 12.1 na ubuntu 24.04 === jak zainstalowac cuda 12.1 na ubuntu 24.04 === Assistant: OK Piotr — oto pełna, sprawdzona instrukcja instalacji CUDA 12.1 na Ubuntu 24.04 Noble Numbat, krok po kroku. === OK Piotr — oto pełna, sprawdzona instrukcja instalacji CUDA 12.1 na Ubuntu 24.04 (Noble Numbat), krok po kroku. Zakładam, że chcesz mieć środowisko działające np. z PyTorch lub TensorFlow, bez psucia sterowników systemowych. ==== 🧰 1️⃣ Wstępne informacje ==== * Ubuntu 24.04 jest nową wersją, więc oficjalne repozytoria NVIDII mogą nie mieć jeszcze dedykowanego wpisu dla 24.04, ale CUDA 12.1 działa poprawnie po ręcznej instalacji. * Najbezpieczniej nie instalować przez <code>apt install nvidia-cuda-toolkit</code>, bo to daje starą wersję (z repo Ubuntu). ==== ⚙️ 2️⃣ Usuń stare instalacje (jeśli coś było instalowane wcześniej) ==== <syntaxhighlight lang="bash">sudo apt remove --purge 'nvidia-''' 'cuda-''' 'libcudnn*' sudo apt autoremove sudo apt clean </syntaxhighlight> Zrestartuj komputer: <syntaxhighlight lang="bash">sudo reboot </syntaxhighlight> ==== 🧩 3️⃣ Dodaj repozytorium NVIDII (dla Ubuntu 22.04 — działa też na 24.04) ==== Pobierz oficjalny instalator repozytorium: <syntaxhighlight lang="bash">wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/cuda-ubuntu2204.pin sudo mv cuda-ubuntu2204.pin /etc/apt/preferences.d/cuda-repository-pin-600 </syntaxhighlight> Dodaj repozytorium: <syntaxhighlight lang="bash">sudo apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/3bf863cc.pub sudo add-apt-repository "deb https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/ /" </syntaxhighlight> Zaktualizuj listę pakietów: <syntaxhighlight lang="bash">sudo apt update </syntaxhighlight> ==== 🚀 4️⃣ Zainstaluj CUDA 12.1 ==== <syntaxhighlight lang="bash">sudo apt install -y cuda-12-1 </syntaxhighlight> Instalacja potrwa kilka minut. Po zakończeniu zrestartuj komputer: <syntaxhighlight lang="bash">sudo reboot </syntaxhighlight> ==== 🧠 5️⃣ Skonfiguruj ścieżki środowiskowe ==== Dodaj do pliku ~/.bashrc (lub ~/.zshrc, jeśli używasz Zsh): <syntaxhighlight lang="bash">export PATH=/usr/local/cuda-12.1/bin${PATH:+:${PATH}} export LD_LIBRARY_PATH=/usr/local/cuda-12.1/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}} </syntaxhighlight> Zastosuj zmiany: <syntaxhighlight lang="bash">source ~/.bashrc </syntaxhighlight> ==== ✅ 6️⃣ Sprawdź instalację ==== Po restarcie sprawdź: <syntaxhighlight lang="bash">nvidia-smi </syntaxhighlight> Powinno pokazać wersję sterownika i listę GPU. Sprawdź wersję CUDA: <syntaxhighlight lang="bash">nvcc --version </syntaxhighlight> Powinno wyświetlić coś w stylu: <syntaxhighlight>Cuda compilation tools, release 12.1, V12.1.105 </syntaxhighlight> ==== 🧩 7️⃣ (Opcjonalnie) Zainstaluj cuDNN dla CUDA 12.1 ==== Zaloguj się (lub utwórz konto) na https://developer.nvidia.com/cudnn, wybierz: * cuDNN v8.x dla CUDA 12.x * Wersję „Local Installer (Ubuntu 22.04 DEB)” — działa też na 24.04. Zainstaluj np.: <syntaxhighlight lang="bash">sudo dpkg -i cudnn-local-repo-ubuntu2204-8.x.x.x_1.0-1_amd64.deb sudo apt update sudo apt install libcudnn8 libcudnn8-dev </syntaxhighlight> ==== 🧩 8️⃣ (Opcjonalnie) Sprawdzenie działania z Pythonem ==== Zainstaluj np. PyTorch z CUDA 12.1: <syntaxhighlight lang="bash">pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu121 </syntaxhighlight> I sprawdź w Pythonie: <syntaxhighlight lang="python">import torch print(torch.cuda.is_available()) </syntaxhighlight> Jeśli zwraca True, wszystko działa 👍 Chcesz, żebym przygotował Ci skrypt bash (<code>install_cuda_12_1.sh</code>), który automatycznie wykona wszystkie powyższe kroki na Ubuntu 24.04? == References == <references /> [[Category:ChatGPT Shares]] [[Category:openai]]
Summary:
Please note that all contributions to freem are considered to be released under the Creative Commons Attribution-ShareAlike 4.0 (see
Freem:Copyrights
for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource.
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Templates used on this page:
Template:Cite web
(
edit
)
Module:Citation/CS1
(
edit
)
Module:Citation/CS1/COinS
(
edit
)
Module:Citation/CS1/Configuration
(
edit
)
Module:Citation/CS1/Date validation
(
edit
)
Module:Citation/CS1/Identifiers
(
edit
)
Module:Citation/CS1/Utilities
(
edit
)
Module:Citation/CS1/Whitelist
(
edit
)
Module:Citation/CS1/styles.css
(
edit
)