白嫖百度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 的方法)
瀏覽量這么多,大哥們倒是幫我點個贊啊~


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM