171 lines
8.6 KiB
Markdown
171 lines
8.6 KiB
Markdown
---
|
||
tags:
|
||
- ubuntu
|
||
- cuda
|
||
- cuDnn
|
||
aliases:
|
||
date: 2025-11-18
|
||
time: 13:55:39
|
||
description:
|
||
---
|
||
|
||
時間:13:55:39
|
||
|
||
---
|
||
|
||
# 今日發生什麼事?
|
||
- 安裝git lfs:
|
||
- [Git Large File Storage | Git Large File Storage (LFS) replaces large files such as audio samples, videos, datasets, and graphics with text pointers inside Git, while storing the file contents on a remote server like GitHub.com or GitHub Enterprise.](https://git-lfs.com/)
|
||
- 安裝 uv
|
||
- [Installation | uv](https://docs.astral.sh/uv/getting-started/installation/#standalone-installer)
|
||
- 要有 linux gpu 版本跟 linux cpu 版本
|
||
- tensorflow 各版本對應的 Python、Compiler、Build tools、cuDNN 與 cuda 版號
|
||
- [Build from source on Linux](https://tensorflow.google.cn/install/source?hl=en#setup_for_linux_and_macos)
|
||
- [Build from source on Windows](https://tensorflow.google.cn/install/source_windows?hl=en)
|
||
- [CUDA Toolkit 12.9 Update 1 for Ubuntu 24.04](https://developer.nvidia.com/cuda-12-9-1-download-archive?target_os=Linux&target_arch=x86_64&Distribution=Ubuntu&target_version=24.04&target_type=deb_local)
|
||
- [cuDNN 9.16.0](https://developer.nvidia.com/cudnn-downloads?target_os=Linux&target_arch=x86_64&Distribution=Ubuntu&target_version=24.04&target_type=deb_local&Configuration=Full)
|
||
- [cuDNN Installation](https://docs.nvidia.com/deeplearning/cudnn/installation/latest/prerequisites.html#required-software-and-hardware)
|
||
- [cuDNN archive](https://developer.nvidia.com/cudnn-archive)
|
||
- [cuDNN 與 CUDA Toolkit 版本對照表](https://docs.nvidia.com/deeplearning/cudnn/frontend/v1.16.0/reference/support-matrix.html#support-matrix)
|
||
- 最終組合,tensorflow 2.20 + CUDA 12.9.0 + cuDNN 9.16.0
|
||
|
||
## Install CUDA Toolkit 12.9 for Ubuntu 24.04 x86_64
|
||
```
|
||
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2404/x86_64/cuda-ubuntu2404.pin
|
||
sudo mv cuda-ubuntu2404.pin /etc/apt/preferences.d/cuda-repository-pin-600
|
||
wget https://developer.download.nvidia.com/compute/cuda/12.9.1/local_installers/cuda-repo-ubuntu2404-12-9-local_12.9.1-575.57.08-1_amd64.deb
|
||
sudo dpkg -i cuda-repo-ubuntu2404-12-9-local_12.9.1-575.57.08-1_amd64.deb
|
||
sudo cp /var/cuda-repo-ubuntu2404-12-9-local/cuda-*-keyring.gpg /usr/share/keyrings/
|
||
sudo apt-get update
|
||
sudo apt-get -y install cuda-toolkit-12-9
|
||
```
|
||
|
||
## Install cuDNN 9.16.0 for CUDA Toolkit 12
|
||
cuDNN 9.16.0 有分2個版本,分別支援 CUDA 12 與 CUDA 13。安裝的時候要注意。
|
||
### Installation
|
||
```shell
|
||
wget https://developer.download.nvidia.com/compute/cudnn/9.16.0/local_installers/cudnn-local-repo-ubuntu2404-9.16.0_1.0-1_amd64.deb
|
||
sudo dpkg -i cudnn-local-repo-ubuntu2404-9.16.0_1.0-1_amd64.deb
|
||
sudo cp /var/cudnn-local-repo-ubuntu2404-9.16.0/cudnn-*-keyring.gpg /usr/share/keyrings/
|
||
sudo apt-get update
|
||
```
|
||
|
||
### To install for CUDA 12
|
||
```shell
|
||
sudo apt-get -y install cudnn9-cuda-12
|
||
```
|
||
|
||
### To install for CUDA 13
|
||
```shell
|
||
sudo apt-get -y install cudnn9-cuda-13
|
||
```
|
||
|
||
## Remove local repo
|
||
移除本地的 deb package
|
||
1. 先找出安裝的 package name
|
||
```
|
||
dpkg -l | grep cuda-repo
|
||
```
|
||
|
||
- 你應該會看到類似:
|
||
```shell
|
||
ii cuda-repo-debian12-12-9-local 12.9.1-575.57.08-1 amd64
|
||
```
|
||
|
||
2. 移除
|
||
- 設定檔保留
|
||
```
|
||
sudo dpkg -r cuda-repo-debian12-12-9-local
|
||
```
|
||
- 設定檔一併移除
|
||
```
|
||
sudo dpkg -P cuda-repo-debian12-12-9-local
|
||
```
|
||
|
||
3. 用 `apt` 遺除以安裝的套件
|
||
1. 先找出主要的套件
|
||
```
|
||
apt list --installed | grep cuda
|
||
```
|
||
2. 會看到類似以下
|
||
```
|
||
cuda-cccl-12-9/unknown,now 12.9.27-1 amd64 [installed,automatic]
|
||
cuda-command-line-tools-12-9/unknown,now 12.9.1-1 amd64 [installed,automatic]
|
||
cuda-compiler-12-9/unknown,now 12.9.1-1 amd64 [installed,automatic]
|
||
cuda-crt-12-9/unknown,now 12.9.86-1 amd64 [installed,automatic]
|
||
cuda-cudart-12-9/unknown,now 12.9.79-1 amd64 [installed,automatic]
|
||
cuda-cudart-dev-12-9/unknown,now 12.9.79-1 amd64 [installed,automatic]
|
||
cuda-cuobjdump-12-9/unknown,now 12.9.82-1 amd64 [installed,automatic]
|
||
cuda-cupti-12-9/unknown,now 12.9.79-1 amd64 [installed,automatic]
|
||
cuda-cupti-dev-12-9/unknown,now 12.9.79-1 amd64 [installed,automatic]
|
||
cuda-cuxxfilt-12-9/unknown,now 12.9.82-1 amd64 [installed,automatic]
|
||
cuda-documentation-12-9/unknown,now 12.9.88-1 amd64 [installed,automatic]
|
||
cuda-driver-dev-12-9/unknown,now 12.9.79-1 amd64 [installed,automatic]
|
||
cuda-gdb-12-9/unknown,now 12.9.79-1 amd64 [installed,automatic]
|
||
cuda-libraries-12-9/unknown,now 12.9.1-1 amd64 [installed,automatic]
|
||
cuda-libraries-dev-12-9/unknown,now 12.9.1-1 amd64 [installed,automatic]
|
||
cuda-nsight-12-9/unknown,now 12.9.79-1 amd64 [installed,automatic]
|
||
cuda-nsight-compute-12-9/unknown,now 12.9.1-1 amd64 [installed,automatic]
|
||
cuda-nsight-systems-12-9/unknown,now 12.9.1-1 amd64 [installed,automatic]
|
||
cuda-nvcc-12-9/unknown,now 12.9.86-1 amd64 [installed,automatic]
|
||
cuda-nvdisasm-12-9/unknown,now 12.9.88-1 amd64 [installed,automatic]
|
||
cuda-nvml-dev-12-9/unknown,now 12.9.79-1 amd64 [installed,automatic]
|
||
cuda-nvprof-12-9/unknown,now 12.9.79-1 amd64 [installed,automatic]
|
||
cuda-nvprune-12-9/unknown,now 12.9.82-1 amd64 [installed,automatic]
|
||
cuda-nvrtc-12-9/unknown,now 12.9.86-1 amd64 [installed,automatic]
|
||
cuda-nvrtc-dev-12-9/unknown,now 12.9.86-1 amd64 [installed,automatic]
|
||
cuda-nvtx-12-9/unknown,now 12.9.79-1 amd64 [installed,automatic]
|
||
cuda-nvvm-12-9/unknown,now 12.9.86-1 amd64 [installed,automatic]
|
||
cuda-nvvp-12-9/unknown,now 12.9.79-1 amd64 [installed,automatic]
|
||
cuda-opencl-12-9/unknown,now 12.9.19-1 amd64 [installed,automatic]
|
||
cuda-profiler-api-12-9/unknown,now 12.9.79-1 amd64 [installed,automatic]
|
||
cuda-repo-debian12-12-9-local/now 12.9.1-575.57.08-1 amd64 [installed,local]
|
||
cuda-sandbox-dev-12-9/unknown,now 12.9.19-1 amd64 [installed,automatic]
|
||
cuda-sanitizer-12-9/unknown,now 12.9.79-1 amd64 [installed,automatic]
|
||
cuda-toolkit-12-9-config-common/unknown,now 12.9.79-1 all [installed,automatic]
|
||
cuda-toolkit-12-9/unknown,now 12.9.1-1 amd64 [installed]
|
||
cuda-toolkit-12-config-common/unknown,now 12.9.79-1 all [installed,automatic]
|
||
cuda-toolkit-config-common/unknown,now 12.9.79-1 all [installed,automatic]
|
||
cuda-tools-12-9/unknown,now 12.9.1-1 amd64 [installed,automatic]
|
||
cuda-visual-tools-12-9/unknown,now 12.9.1-1 amd64 [installed,automatic]
|
||
```
|
||
3. 移除:`sudo apt remove cuda-tools-12-9`
|
||
4. 清除沒用的套件:`sudo apt autoremove`
|
||
5. 刪除 keyring (如果你不再需要 CUDA repo):`sudo rm /usr/share/keyrings/cuda-*-keyring.gpg`
|
||
|
||
|
||
## 紀錄一下這幾天買的東西
|
||
### Facebook
|
||
#### Hui Chuan Shin
|
||
- [x] 長毛烏羽玉 x 2 = NT$400 ✅ 2025-11-22
|
||
- [x] 銀冠玉 x 2 = NT$400 ✅ 2025-11-22
|
||
#### Taipei Caudex Club
|
||
- [x] 正白皮沒藥 NT$8000 ✅ 2025-11-25
|
||
#### Clsc Caudex Vick (城市塊根)
|
||
- [x] 瓶幹麒麟 NT$400 ✅ 2025-11-22
|
||
#### Eva Hsu
|
||
- [x] 無刺象牙丸 NT$1000 ✅ 2025-11-22
|
||
#### 酉 5pm.twcaudex
|
||
- [ ] ~~威迪沒藥 NT$5500~~
|
||
|
||
### 蝦皮
|
||
#### [雲植園](https://shopee.tw/easy_planting?entryPoint=OrderDetail)
|
||
- [x] [Discocactus horstii](https://shopee.tw/Discocactus-horstii-%EF%BD%9C5%E5%85%AC%E5%88%86%E4%BB%A5%E4%B8%8A%E9%96%8B%E8%8A%B1%E5%B0%BA%E5%AF%B8%EF%BD%9C%E5%A5%87%E7%89%B9%E4%B8%B8-%E9%96%8B%E8%8A%B1%E7%88%86%E9%A6%99%EF%BD%9C%E5%A4%9C%E9%96%8B%E9%A6%99%E8%8A%B1-%E4%BB%99%E4%BA%BA%E6%8E%8C%EF%BD%9C%E7%8C%B4%E5%B1%8D%E9%AB%94-%E5%A4%9A%E8%82%89%E6%A4%8D%E7%89%A9-i.1419103280.44023376705) NT$450 ✅ 2025-11-20
|
||
- [x] [短豪刺琴絲丸(Mammillaria camptotricha)](https://shopee.tw/%E7%9F%AD%E8%B1%AA%E5%88%BA-%E7%90%B4%E7%B5%B2%E4%B8%B8-Mammillaria-camptotricha-i.1419103280.41860658534) NT$460 ✅ 2025-11-20
|
||
#### [陽光美錦DAYLIGHT PLANTS](https://shopee.tw/pennychang1001?entryPoint=OrderDetail)
|
||
- [x] [王妃雷神黃中斑](https://shopee.tw/%E7%8E%8B%E5%A6%83%E9%9B%B7%E7%A5%9E%E9%BB%83%E4%B8%AD%E6%96%91-%E4%B8%80%E7%89%A9%E4%B8%80%E6%8B%8D-%E9%BE%8D%E8%88%8C%E8%98%AD%E7%A7%91-%E5%A4%9A%E8%82%89-%E9%99%BD%E5%85%89%E7%BE%8E%E9%8C%A6DAYLIGHT-PLAN-i.9390921.28830880746) NT$380 ✅ 2025-11-20
|
||
#### [陽明園](https://shopee.tw/annie__chang?entryPoint=OrderDetail)
|
||
- [x] [直刺佩雷(Mammillaria perezdelarosae)](https://shopee.tw/%E9%99%BD%E6%98%8E%E5%9C%92-%E4%BB%99%E4%BA%BA%E6%8E%8C%E7%A7%91-%E7%9B%B4%E5%88%BA%E4%BD%A9%E9%9B%B7-Mammillaria-perezdelarosae-i.72033122.29973338254) NT$880 ✅ 2025-11-21
|
||
- [x] [總理大賞笹之雪](https://shopee.tw/%E9%99%BD%E6%98%8E%E5%9C%92-%E9%BE%8D%E8%88%8C%E8%98%AD-%E7%B8%BD%E7%90%86%E5%A4%A7%E8%B3%9E%E7%AC%B9%E4%B9%8B%E9%9B%AA-%E4%B8%80%E7%89%A9%E4%B8%80%E6%8B%8D-i.72033122.10659429502) NT$600 ✅ 2025-11-21
|
||
#### [BJ多肉植物](https://shopee.tw/a86239wen618?entryPoint=OrderDetail)
|
||
- [x] 吹雪 NT$150 ✅ 2025-11-20
|
||
- [x] 菊水綴化 NT$600 ✅ 2025-11-20
|
||
|
||
# 有什麼想法?
|
||
|
||
|
||
# 相對應的行動是什麼?
|
||
|
||
|
||
# 還沒做的事
|