前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >【安装记录】ubuntu18.04+cuda 9.1+NVIDIA 390

【安装记录】ubuntu18.04+cuda 9.1+NVIDIA 390

作者头像
Centy Zhao
发布2019-12-26 16:34:34
8120
发布2019-12-26 16:34:34
举报
文章被收录于专栏:icecream小屋icecream小屋

1安装ubuntu

2安装NVIDIA Driver

参照https://zhuanlan.zhihu.com/p/36502449

https://blog.csdn.net/hhhuua/article/details/80734092

测试nvidia-smi

3安装ubuntu(因为装390版本,无法安装cuda9.2)

降低gcc版本https://blossomnoodles.github.io/cnBlogs/2018/04/30/Ubuntu18.04-Tensorlow-install.html

gcc --version # check ubuntu 18.04 gcc version, you will find it's 7.3.0

sudo apt install gcc-5 g++-5

sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-5 50 # you will find that message that tells you the gcc-5 is set to be automatic.

sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-5 50 # similiar message as gcc

下载cuda 9.1的四个文件,并执行

https://blog.csdn.net/u010801439/article/details/80483036【sudo vim ~/.barshrc实际上是sudo vim ~/.bashrc】

参考下文进行测试

https://blog.csdn.net/fei_6/article/details/75305692

再次测试

nvcc -V

4cudnn7.0.5

https://blog.csdn.net/aiolia86/article/details/80342240

5Anaconda pytorch

https://blog.csdn.net/Sebastien23/article/details/80554837

创建自己的pytho2.7+pytorch环境:

https://www.jianshu.com/p/035b891b52e4

https://blog.csdn.net/acbattle/article/details/80894979

使用docker安装torch【因为18.04装不了tprch的一个安装包,所以使用docker】

deepo项目:https://blog.csdn.net/FYZ530357172/article/details/79217460

https://blog.csdn.net/qiansg123/article/details/78559085

https://www.cnblogs.com/bingmang/p/9813686.html

https://blog.csdn.net/u013066730/article/details/51526068

https://blog.csdn.net/qq_36142114/article/details/81605372

https://blog.csdn.net/zw__chen/article/details/82218774#1-%E4%B8%8B%E8%BD%BD%E9%95%9C%E5%83%8F%E6%96%87%E4%BB%B6

https://www.jianshu.com/p/eb363da420bd

其中,安装docker请参照https://yeasy.gitbooks.io/docker_practice/install/ubuntu.html(使用了中科大的链接)

nvidia部分则参考官网可以顺利安装。

nvidia-docker run -it -v /host/data:/data -v /host/config:/config ufoym/deepo bash

nvidia-docker run -it -v /host/data:/data -v /host/config:/config ufoym/deepo:py27 bash

最新版【使用jupyter notebook】:

docker pull ufoym/deepo:all-py27-jupyter

nvidia-docker run --rm ufoym/deepo:all-py27 nvidia-smi

nvidia-docker run -it -p 8888:8888 --ipc=host -v /home/..../joy/data:/data ufoym/deepo:all-py27-jupyter jupyter notebook --no-browser --ip=0.0.0.0 --allow-root --notebook-dir='/data'(不设置密码,直接使用系统自己生成的)

运行如下图

右击打开连接即可

6pycharm

目标:使用笔记本的windows系统的pycharm,远程连接ubuntu系统(GPU),ubuntu使用步骤5docker连接学习环境

原本的

nvidia-docker run -it -v /host/data:/data -v /host/config:/config ufoym/deepo:py27 bash

改为

sudo nvidia-docker run -it -p 8022:22 -v /host/data:/data -v /host/config:/config ufoym/deepo:py27 bash

需要配置远程的电脑的sshhttps://www.jianshu.com/p/5cd9ab4aa5f5(port改为8022)

ifconfig -a(查找地址https://blog.csdn.net/u012269267/article/details/52260757)

ssh root@<你服务器的ip地址> -p 8022

配置参考

sudo docker container ls -l(查看镜像的名字,最后一列names)

关闭防火墙 ufw disable

https://my.oschina.net/u/146514/blog/512025

https://blog.csdn.net/github_33934628/article/details/80919646#commentBox

本文参与 腾讯云自媒体分享计划,分享自作者个人站点/博客。
如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体分享计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
相关产品与服务
容器镜像服务
容器镜像服务(Tencent Container Registry,TCR)为您提供安全独享、高性能的容器镜像托管分发服务。您可同时在全球多个地域创建独享实例,以实现容器镜像的就近拉取,降低拉取时间,节约带宽成本。TCR 提供细颗粒度的权限管理及访问控制,保障您的数据安全。
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档