環境基礎:
neofetch
.-/+oossssoo+/-. root@zhy-cuda
`:+ssssssssssssssssss+:` -------------
-+ssssssssssssssssssyyssss+- OS: Ubuntu 22.04 LTS x86_64
.ossssssssssssssssssdMMMNysssso. Host: SA5212M5 00001
/ssssssssssshdmmNNmmyNMMMMhssssss/ Kernel: 6.8.4-3-pve
+ssssssssshmydMMMMMMMNddddyssssssss+ Uptime: 13 hours, 43 mins
/sssssssshNMMMyhhyyyyhmNMMMNhssssssss/ Packages: 535 (dpkg)
.ssssssssdMMMNhsssssssssshNMMMdssssssss. Shell: bash 5.1.16
+sssshhhyNMMNyssssssssssssyNMMMysssssss+ Resolution: 1024x768
ossyNMMMNyMMhsssssssssssssshmmmhssssssso Terminal: node
ossyNMMMNyMMhsssssssssssssshmmmhssssssso CPU: Intel Xeon Gold 6138 (80) @ 3.700GHz
+sssshhhyNMMNyssssssssssssyNMMMysssssss+ GPU: NVIDIA GeForce GTX 1080 Ti
.ssssssssdMMMNhsssssssssshNMMMdssssssss. Memory: 3977MiB / 32768MiB
/sssssssshNMMMyhhyyyyhdNMMMNhssssssss/
+sssssssssdmydMMMMMMMMddddyssssssss+
/ssssssssssshdmNNNNmyNMMMMhssssss/
.ossssssssssssssssssdMMMNysssso.
-+sssssssssssssssssyyyssss+-
`:+ssssssssssssssssss+:`
.-/+oossssoo+/-.
nvidia-smi
Sun Jul 28 05:42:24 2024
+---------------------------------------------------------------------------------------+
| NVIDIA-SMI 535.154.05 Driver Version: 535.154.05 CUDA Version: 12.2 |
|-----------------------------------------+----------------------+----------------------+
| GPU Name Persistence-M | Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap | Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|=========================================+======================+======================|
| 0 NVIDIA GeForce GTX 1080 Ti On | 00000000:3B:00.0 Off | N/A |
| 0% 27C P8 9W / 300W | 2MiB / 11264MiB | 0% Default |
| | | N/A |
+-----------------------------------------+----------------------+----------------------+
+---------------------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=======================================================================================|
| No running processes found |
+---------------------------------------------------------------------------------------+
安裝conda
直接來到官網安裝,選擇跳過註冊即可:
https://www.anaconda.com/download/success
wget https://repo.anaconda.com/archive/Anaconda3-2024.06-1-Linux-x86_64.sh
chmod +x Anaconda3-2024.06-1-Linux-x86_64.sh
export LC_ALL=C.UTF-8
export LANG=C.UTF-8
./Anaconda3-2024.06-1-Linux-x86_64.sh
中途出現了一個路徑錯誤,但是我並有中文路徑,所以加上了兩句export,之後正常安裝。
然後重啟終端。
安裝conda環境
conda create --name nerfstudio -y python=3.8
conda activate nerfstudio
python -m pip install --upgrade pip
到這裡正常,然後需要安裝一些包。這裡加入代理
# 設定代理
conda config --set proxy_servers.http http://10.10.10.100:7890
conda config --set proxy_servers.https http://10.10.10.100:7890
# 取消代理
conda config --set proxy_servers.http http://10.10.10.100:7890
conda config --set proxy_servers.https http://10.10.10.100:7890
然後發現代理無效,於是使用清華源安裝對應的庫:
pip3 install torch==2.1.2 torchvision==0.16.2 -i https://pypi.tuna.tsinghua.edu.cn/simple
然後設定conda 清華源
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/
conda config --set show_channel_urls yes
————————————————
版權宣告:本文為博主原創文章,遵循 CC 4.0 BY-SA 版權協議,轉載請附上原文出處連結和本宣告。
原文連結:https://blog.csdn.net/Boys_Wu/article/details/106623192
然後安裝
conda install -c "nvidia/label/cuda-11.8.0" cuda-toolkit
最後從原始碼安裝nerfstudio即可:
git clone https://github.com/nerfstudio-project/nerfstudio.git
cd nerfstudio
pip install --upgrade pip setuptools
pip install -e .