ubuntu大服务器 pytorch环境配置
ubuntu大服务器
star@xmatrix:~/Yolov/yolov5-master$ star@xmatrix:~/Yolov/yolov5-master$ star@xmatrix:~/Yolov/yolov5-master$ star@xmatrix:~/Yolov/yolov5-master$ conda create -n wind_202103 python=3.7 Collecting package metadata (current_repodata.json): done Solving environment: done ==> WARNING: A newer version of conda exists. <== current version: 4.8.3 latest version: 4.9.2 Please update conda by running $ conda update -n base -c defaults conda ## Package Plan ## environment location: /home/star/anaconda3/envs/wind_202103 added / updated specs: - python=3.7 The following packages will be downloaded: package | build ---------------------------|----------------- _libgcc_mutex-0.1 | conda_forge 3 KB https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge _openmp_mutex-4.5 | 1_gnu 22 KB https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge ca-certificates-2020.12.5 | ha878542_0 137 KB https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge certifi-2020.12.5 | py37h89c1867_1 143 KB https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge ld_impl_linux-64-2.35.1 | hea4e1c9_1 617 KB https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge libffi-3.3 | h58526e2_2 51 KB https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge libgcc-ng-9.3.0 | h5dbcf3e_17 7.8 MB https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge libgomp-9.3.0 | h5dbcf3e_17 378 KB https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge libstdcxx-ng-9.3.0 | h2ae2ef3_17 4.0 MB https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge ncurses-6.2 | h58526e2_4 985 KB https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge openssl-1.1.1i | h7f98852_0 2.1 MB https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge pip-20.3.3 | pyhd8ed1ab_0 1.1 MB https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge python-3.7.9 |hffdb5ce_0_cpython 57.3 MB https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge python_abi-3.7 | 1_cp37m 4 KB https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge readline-8.0 | he28a2e2_2 281 KB https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge setuptools-49.6.0 | py37h89c1867_3 947 KB https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge sqlite-3.34.0 | h74cdb3f_0 1.4 MB https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge tk-8.6.10 | h21135ba_1 3.2 MB https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge wheel-0.36.2 | pyhd3deb0d_0 31 KB https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge xz-5.2.5 | h516909a_1 343 KB https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge zlib-1.2.11 | h516909a_1010 106 KB https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge ------------------------------------------------------------ Total: 81.0 MB The following NEW packages will be INSTALLED: _libgcc_mutex anaconda/cloud/conda-forge/linux-64::_libgcc_mutex-0.1-conda_forge _openmp_mutex anaconda/cloud/conda-forge/linux-64::_openmp_mutex-4.5-1_gnu ca-certificates anaconda/cloud/conda-forge/linux-64::ca-certificates-2020.12.5-ha878542_0 certifi anaconda/cloud/conda-forge/linux-64::certifi-2020.12.5-py37h89c1867_1 ld_impl_linux-64 anaconda/cloud/conda-forge/linux-64::ld_impl_linux-64-2.35.1-hea4e1c9_1 libffi anaconda/cloud/conda-forge/linux-64::libffi-3.3-h58526e2_2 libgcc-ng anaconda/cloud/conda-forge/linux-64::libgcc-ng-9.3.0-h5dbcf3e_17 libgomp anaconda/cloud/conda-forge/linux-64::libgomp-9.3.0-h5dbcf3e_17 libstdcxx-ng anaconda/cloud/conda-forge/linux-64::libstdcxx-ng-9.3.0-h2ae2ef3_17 ncurses anaconda/cloud/conda-forge/linux-64::ncurses-6.2-h58526e2_4 openssl anaconda/cloud/conda-forge/linux-64::openssl-1.1.1i-h7f98852_0 pip anaconda/cloud/conda-forge/noarch::pip-20.3.3-pyhd8ed1ab_0 python anaconda/cloud/conda-forge/linux-64::python-3.7.9-hffdb5ce_0_cpython python_abi anaconda/cloud/conda-forge/linux-64::python_abi-3.7-1_cp37m readline anaconda/cloud/conda-forge/linux-64::readline-8.0-he28a2e2_2 setuptools anaconda/cloud/conda-forge/linux-64::setuptools-49.6.0-py37h89c1867_3 sqlite anaconda/cloud/conda-forge/linux-64::sqlite-3.34.0-h74cdb3f_0 tk anaconda/cloud/conda-forge/linux-64::tk-8.6.10-h21135ba_1 wheel anaconda/cloud/conda-forge/noarch::wheel-0.36.2-pyhd3deb0d_0 xz anaconda/cloud/conda-forge/linux-64::xz-5.2.5-h516909a_1 zlib anaconda/cloud/conda-forge/linux-64::zlib-1.2.11-h516909a_1010 Proceed ([y]/n)? Y Downloading and Extracting Packages libgomp-9.3.0 | 378 KB | #################################################################### | 100% python-3.7.9 | 57.3 MB | #################################################################### | 100% xz-5.2.5 | 343 KB | #################################################################### | 100% _openmp_mutex-4.5 | 22 KB | #################################################################### | 100% setuptools-49.6.0 | 947 KB | #################################################################### | 100% libstdcxx-ng-9.3.0 | 4.0 MB | #################################################################### | 100% sqlite-3.34.0 | 1.4 MB | #################################################################### | 100% _libgcc_mutex-0.1 | 3 KB | #################################################################### | 100% zlib-1.2.11 | 106 KB | #################################################################### | 100% tk-8.6.10 | 3.2 MB | #################################################################### | 100% ca-certificates-2020 | 137 KB | #################################################################### | 100% ncurses-6.2 | 985 KB | #################################################################### | 100% python_abi-3.7 | 4 KB | #################################################################### | 100% pip-20.3.3 | 1.1 MB | #################################################################### | 100% ld_impl_linux-64-2.3 | 617 KB | #################################################################### | 100% certifi-2020.12.5 | 143 KB | #################################################################### | 100% libgcc-ng-9.3.0 | 7.8 MB | #################################################################### | 100% readline-8.0 | 281 KB | #################################################################### | 100% wheel-0.36.2 | 31 KB | #################################################################### | 100% openssl-1.1.1i | 2.1 MB | #################################################################### | 100% libffi-3.3 | 51 KB | #################################################################### | 100% Preparing transaction: done Verifying transaction: done Executing transaction: done # # To activate this environment, use # # $ conda activate wind_202103 # # To deactivate an active environment, use # # $ conda deactivate star@xmatrix:~/Yolov/yolov5-master$ star@xmatrix:~/Yolov/yolov5-master$ star@xmatrix:~/Yolov/yolov5-master$ star@xmatrix:~/Yolov/yolov5-master$
star@xmatrix:~$ nvidia-smi
Thu Dec 26 17:19:43 2019
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 418.67 Driver Version: 418.67 CUDA Version: 10.1 |
|-------------------------------+----------------------+----------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
|===============================+======================+======================|
| 0 Tesla P4 Off | 00000000:02:00.0 Off | 0 |
| N/A 76C P0 43W / 75W | 7483MiB / 7611MiB | 48% Default |
+-------------------------------+----------------------+----------------------+
+-----------------------------------------------------------------------------+
| Processes: GPU Memory |
| GPU PID Type Process name Usage |
|=============================================================================|
| 0 10454 C python 7473MiB |
+-----------------------------------------------------------------------------+
star@xmatrix:~$
star@xmatrix:~$
下载并安装torch 1.7
(wind_202103) star@xmatrix:~/PyTorch$
(wind_202103) star@xmatrix:~/PyTorch$
(wind_202103) star@xmatrix:~/PyTorch$
(wind_202103) star@xmatrix:~/PyTorch$
(wind_202103) star@xmatrix:~/PyTorch$ pip install torch-1.7.1+cu101-cp37-cp37m-linux_x86_64.whl
Processing ./torch-1.7.1+cu101-cp37-cp37m-linux_x86_64.whl
Collecting numpy
Downloading numpy-1.19.5-cp37-cp37m-manylinux2010_x86_64.whl (14.8 MB)
|████████████████████████████████| 14.8 MB 12.2 MB/s
Collecting typing-extensions
Downloading typing_extensions-3.7.4.3-py3-none-any.whl (22 kB)
Installing collected packages: typing-extensions, numpy, torch
Successfully installed numpy-1.19.5 torch-1.7.1+cu101 typing-extensions-3.7.4.3
(wind_202103) star@xmatrix:~/PyTorch$
(wind_202103) star@xmatrix:~/PyTorch$
(wind_202103) star@xmatrix:~/PyTorch$
(wind_202103) star@xmatrix:~/PyTorch$
(wind_202103) star@xmatrix:~/PyTorch$
(wind_202103) star@xmatrix:~/PyTorch$
(wind_202103) star@xmatrix:~/PyTorch$ pip install torchvision==0.8.2
Collecting torchvision==0.8.2
Downloading torchvision-0.8.2-cp37-cp37m-manylinux1_x86_64.whl (12.8 MB)
|████████████████████████████████| 12.8 MB 12.4 MB/s
Requirement already satisfied: torch==1.7.1 in /home/star/anaconda3/envs/wind_202103/lib/python3.7/site-packages (from torchvision==0.8.2) (1.7.1+cu101)
Requirement already satisfied: numpy in /home/star/anaconda3/envs/wind_202103/lib/python3.7/site-packages (from torchvision==0.8.2) (1.19.5)
Requirement already satisfied: typing-extensions in /home/star/anaconda3/envs/wind_202103/lib/python3.7/site-packages (from torch==1.7.1->torchvision==0.8.2) (3.7.4.3)
Collecting pillow>=4.1.1
Downloading Pillow-8.1.0-cp37-cp37m-manylinux1_x86_64.whl (2.2 MB)
|████████████████████████████████| 2.2 MB 12.9 MB/s
Installing collected packages: pillow, torchvision
Successfully installed pillow-8.1.0 torchvision-0.8.2
(wind_202103) star@xmatrix:~/PyTorch$
(wind_202103) star@xmatrix:~/PyTorch$
(wind_202103) star@xmatrix:~/PyTorch$
(wind_202103) star@xmatrix:~/PyTorch$
(wind_202103) star@xmatrix:~/PyTorch$
(wind_202103) star@xmatrix:~/PyTorch$
(wind_202103) star@xmatrix:~/PyTorch$
(wind_202103) star@xmatrix:~/PyTorch$
(wind_202103) star@xmatrix:~/PyTorch$ pip install torchaudio===0.7.2
Collecting torchaudio===0.7.2
Downloading torchaudio-0.7.2-cp37-cp37m-manylinux1_x86_64.whl (7.6 MB)
|████████████████████████████████| 7.6 MB 1.3 MB/s
Requirement already satisfied: torch==1.7.1 in /home/star/anaconda3/envs/wind_202103/lib/python3.7/site-packages (from torchaudio===0.7.2) (1.7.1+cu101)
Requirement already satisfied: typing-extensions in /home/star/anaconda3/envs/wind_202103/lib/python3.7/site-packages (from torch==1.7.1->torchaudio===0.7.2) (3.7.4.3)
Requirement already satisfied: numpy in /home/star/anaconda3/envs/wind_202103/lib/python3.7/site-packages (from torch==1.7.1->torchaudio===0.7.2) (1.19.5)
Installing collected packages: torchaudio
Successfully installed torchaudio-0.7.2
(wind_202103) star@xmatrix:~/PyTorch$
(wind_202103) star@xmatrix:~/PyTorch$
(wind_202103) star@xmatrix:~/PyTorch$
(wind_202103) star@xmatrix:~/PyTorch$
(wind_202103) star@xmatrix:~/PyTorch$
(wind_202103) star@xmatrix:~/PyTorch$
(wind_202103) star@xmatrix:~/PyTorch$
(wind_202103) star@xmatrix:~/PyTorch$
(wind_202103) star@xmatrix:~/PyTorch$
(wind_202103) star@xmatrix:~/PyTorch$
(wind_202103) star@xmatrix:~/PyTorch$
(wind_202103) star@xmatrix:~/PyTorch$
(wind_202103) star@xmatrix:~/PyTorch$
(wind_202103) star@xmatrix:~/PyTorch$
(wind_202103) star@xmatrix:~/PyTorch$
(wind_202103) star@xmatrix:~/PyTorch$
(wind_202103) star@xmatrix:~/PyTorch$
(wind_202103) star@xmatrix:~/PyTorch$
(wind_202103) star@xmatrix:~/PyTorch$
(wind_202103) star@xmatrix:~/PyTorch$ python
Python 3.7.9 | packaged by conda-forge | (default, Dec 9 2020, 21:08:20)
[GCC 9.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>>
>>>
>>> import torch
>>>
>>> x=torch.Tensor([1.0])
>>>
>>> xx=x.cuda()
>>>
>>>
>>> print(xx)
tensor([1.], device='cuda:0')
>>>
>>>
>>> exit();
(wind_202103) star@xmatrix:~/PyTorch$
(wind_202103) star@xmatrix:~/PyTorch$
(wind_202103) star@xmatrix:~/PyTorch$
(wind_202103) star@xmatrix:~/PyTorch$
QQ 3087438119
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 从 HTTP 原因短语缺失研究 HTTP/2 和 HTTP/3 的设计差异
· AI与.NET技术实操系列:向量存储与相似性搜索在 .NET 中的实现
· 基于Microsoft.Extensions.AI核心库实现RAG应用
· Linux系列:如何用heaptrack跟踪.NET程序的非托管内存泄露
· 开发者必知的日志记录最佳实践
· winform 绘制太阳,地球,月球 运作规律
· 超详细:普通电脑也行Windows部署deepseek R1训练数据并当服务器共享给他人
· TypeScript + Deepseek 打造卜卦网站:技术与玄学的结合
· AI 智能体引爆开源社区「GitHub 热点速览」
· 写一个简单的SQL生成工具
2020-01-12 修改IFC对象属性并写入IFC文件