白嫖百度GPU-TeslaV100笔记(在 AI Studio 上使用 tensorflow 和 pytorch 的方法)-亲测可用

1.登陆百度 AI Studio 并按照教程创建新项目

网址:https://aistudio.baidu.com/aistudio/index
在这里插入图片描述

2.启动项目并进入控制台

运行环境选择高级版:GPU为TeslaV100
在这里插入图片描述

3.下载 Anaconda3/Miniconda3 安装脚本

Miniconda3下载地址:https://repo.continuum.io/miniconda/
我下载的版本是:Miniconda3-4.7.12.1-Linux-x86_64.sh

4.安装在 ~/work/*conda3 目录

把下载的文件上传至aistuidio,终端里进入目录并安装sh文件:bash Miniconda3-4.7.12.1-Linux-x86_64.sh
在这里插入图片描述
一直按enter或者yes直到:
在这里插入图片描述
这边需要将Miniconda装在 ~/work/*conda3 目录下,work目录的话重启是不会消失的:
在这里插入图片描述
一顿yes or y操作后Miniconda安装成功:
在这里插入图片描述

5.输入命令 source ~/work/*conda3/bin/activate 进入 conda 环境

输入source ~/work/*conda3/bin/activate或者source activate进入conda环境
在这里插入图片描述

6.安装自己心仪的框架如 tf 和 torch,一切命令从控制台运行,自带的 jupyter 界面当摆设就好,或者当一个好看的命令行用也可以

安装tensorflow1.5.0:pip install tensorflow==1.5.0
在这里插入图片描述

7.测试

进入python,并输入一段tensorflow代码进行测试:

import tensorflow as tf
sess = tf.Session()
a = tf.constant(2)
b = tf.constant(3)
print(sess.run(a+b))

在这里插入图片描述
输出为2+3=5,测试成功,tensorflow可用

部分转自:白嫖百度 Tesla V100 笔记(在 AI Studio 上使用 tensorflow 和 pytorch 的方法)
码字不易,如果您觉得有帮助,麻烦点个赞再走呗~

猜你喜欢

转载自www.cnblogs.com/Kobaayyy/p/12592191.html