Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
cm3Libraries
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
cm3
cm3Libraries
Commits
d6cbc12c
Commit
d6cbc12c
authored
2 years ago
by
Ludovic Noels
Browse files
Options
Downloads
Patches
Plain Diff
for ubuntu 22.04
parent
1cda68b7
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
cm3apps/install.txt
+40
-28
40 additions, 28 deletions
cm3apps/install.txt
with
40 additions
and
28 deletions
cm3apps/install.txt
+
40
−
28
View file @
d6cbc12c
...
@@ -588,51 +588,63 @@ C) Install Open Cascade (optional)
...
@@ -588,51 +588,63 @@ C) Install Open Cascade (optional)
D) Install Torch
D) Install Torch
cd local
cd local
// no gpu
// no gpu
wget https://download.pytorch.org/libtorch/cpu/libtorch-shared-with-deps-
1.4.0%2Bcpu
.zip
wget https://download.pytorch.org/libtorch/
nightly/
cpu/libtorch-shared-with-deps-
latest
.zip
unzip libtorch-shared-with-deps-
1.4.0+cpu
.zip
unzip libtorch-shared-with-deps-
latest
.zip
if you need in python3 without gpu
if you need in python3 without gpu
pip3 install
torch==1.7.1+cpu torchvision==0.8.2+cpu torchaudio==0.7.2 -f
https://download.pytorch.org/whl/
torch_stable.html
sudo
pip3 install
--pre torch torchvision torchaudio --extra-index-url
https://download.pytorch.org/whl/
nightly/cpu
// gpu
// gpu
1) clean up
1) clean up
(still with new ubuntu?, to check)
sudo rm /etc/apt/sources.list.d/cuda*
sudo rm /etc/apt/sources.list.d/cuda*
sudo apt remove --autoremove nvidia-cuda-toolkit
sudo apt remove --autoremove nvidia-cuda-toolkit
sudo apt remove --autoremove nvidia-*
sudo apt remove --autoremove nvidia-*
2) purge
2) purge
(still with new ubuntu?, to check)
sudo apt-get purge nvidia*
sudo apt-get purge nvidia*
sudo apt-get autoremove
sudo apt-get autoremove
sudo apt-get autoclean
sudo apt-get autoclean
sudo rm -rf /usr/local/cuda*
sudo rm -rf /usr/local/cuda*
3) install graphics
3) install graphics
(still with new ubuntu?, to check)
sudo apt update
sudo apt update
sudo add-apt-repository ppa:graphics-drivers
sudo add-apt-repository ppa:graphics-drivers
sudo apt-key adv --fetch-keys http://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/7fa2af80.pub
sudo apt-key adv --fetch-keys http://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/3bf863cc.pub
sudo bash -c 'echo "deb http://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64 /" > /etc/apt/sources.list.d/cuda.list'
sudo bash -c 'echo "deb http://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64 /" > /etc/apt/sources.list.d/cuda.list'
sudo bash -c 'echo "deb http://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu2004/x86_64 /" > /etc/apt/sources.list.d/cuda_learn.list'
//sudo bash -c 'echo "deb http://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu2004/x86_64 /" > /etc/apt/sources.list.d/cuda_learn.list'
// alternative?
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/cuda-ubuntu2204.pinsudo
mv cuda-ubuntu2204.pin /etc/apt/preferences.d/cuda-repository-pin-600
wget https://developer.download.nvidia.com/compute/cuda/11.7.1/local_installers/cuda-repo-ubuntu2204-11-7-local_11.7.1-515.65.01-1_amd64.debsudo
dpkg -i cuda-repo-ubuntu2204-11-7-local_11.7.1-515.65.01-1_amd64.debsudo
cp /var/cuda-repo-ubuntu2204-11-7-local/cuda-*-keyring.gpg /usr/share/keyrings/sudo apt-get update
4) install cuda
sudo apt update
sudo apt update
sudo apt install cuda-11-
0
sudo apt install cuda-11-
7
sudo apt install libcudnn7
add in your .bashrc
add in your .bashrc
export PATH=/usr/local/cuda/bin/:$PATH
export PATH=/usr/local/cuda/bin/:$PATH
export LD_LIBRARY_PATH=/usr/local/cuda/lib64/:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH=/usr/local/cuda/lib64/:$LD_LIBRARY_PATH
4) install cudnn
5) install cudnn (still with new ubuntu?, to check)
method 1)
sudo apt-get -y install nvidia-cudnn
method 2)
download cudnn from nvidia (you need to register and downloadmanualy
download cudnn from nvidia (you need to register and downloadmanualy
https://developer.nvidia.com/compute/
machine-learning/cudnn/secure/8.0.4/11.0_20200923/cudnn-11.0-linux-x6
4-
v
8.
0.4.30.tgz
https://developer.nvidia.com/compute/
cudnn/secure/8.5.0/local_installers/11.7/cudnn-local-repo-cross-sbsa-ubuntu220
4-8.
5.0.96_1.0-1_all.deb
copy in your local directory
copy in your local directory
tar xvf cudnn-11.0-linux-x64-v8.0.4.30.tgz
tar xvf cudnn-11.0-linux-x64-v8.0.4.30.tgz
sudo cp cuda/include/cudnn*.h /usr/local/cuda/include
sudo ln -s ~/local/cuda/include/cudnn* /usr/local/cuda/include/
or sudo ln -s ~/local/cuda/include/cudnn* /usr/local/cuda/include/
sudo ln -s ~/local/cuda/lib64/libcudnn* /usr/local/cuda/lib64
sudo cp cuda/lib64/libcudnn* /usr/local/cuda/lib64
or sudo ln -s ~/local/cuda/lib64/libcudnn* /usr/local/cuda/lib64
sudo chmod a+r /usr/local/cuda/include/cudnn*.h /usr/local/cuda/lib64/libcudnn*
sudo chmod a+r /usr/local/cuda/include/cudnn*.h /usr/local/cuda/lib64/libcudnn*
5
) download torch with gpu
6
) download torch with gpu
wget https://download.pytorch.org/libtorch/cu11
0
/libtorch-shared-with-deps-
1.7.0%2Bcu110
.zip
wget https://download.pytorch.org/libtorch/
nightly/
cu11
7
/libtorch-shared-with-deps-
latest
.zip
unzip libtorch-shared-with-deps-
1.7.0%2Bcu110
.zip
unzip libtorch-shared-with-deps-
latest
.zip
6) if you need in python3
7) if you need in python3
(with gpu)
(with gpu)
sudo pip3 install
torch==1.7.1+cu110 torchvision==0.8.2+cu110 torchaudio===0.7.2 -f
https://download.pytorch.org/whl/
torch_stable.html
sudo pip3 install
--pre torch torchvision torchaudio --extra-index-url
https://download.pytorch.org/whl/
nightly/cu117
(without gpu)
(without gpu)
sudo pip3 install torch==1.7.1+cpu torchvision==0.8.2+cpu torchaudio==0.7.2 -f https://download.pytorch.org/whl/torch_stable.html
sudo pip3 install --pre torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/nightly/cpu
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment