Cloud Computing with FloydHub

Create an account

Install floyd-cli on computer with dependency of python.

pip install -U floyd-cli

Installing...

steriowang:~ sterio$ pip install -U floyd-cli
Collecting floyd-cli
  Downloading floyd-cli-0.10.9.tar.gz
Requirement already up-to-date: click>=6.7 in ./anaconda3/lib/python3.6/site-packages (from floyd-cli)
Collecting clint>=0.5.1 (from floyd-cli)
  Downloading clint-0.5.1.tar.gz
Collecting requests>=2.12.4 (from floyd-cli)
  Downloading requests-2.18.4-py2.py3-none-any.whl (88kB)
    100% |████████████████████████████████| 92kB 31kB/s 
Collecting requests-toolbelt>=0.7.1 (from floyd-cli)
  Downloading requests_toolbelt-0.8.0-py2.py3-none-any.whl (54kB)
    100% |████████████████████████████████| 61kB 36kB/s 
Collecting marshmallow>=2.11.1 (from floyd-cli)
  Downloading marshmallow-2.13.6-py2.py3-none-any.whl (45kB)
    100% |████████████████████████████████| 51kB 85kB/s 
Requirement already up-to-date: pytz>=2016.10 in ./anaconda3/lib/python3.6/site-packages (from floyd-cli)
Collecting shortuuid>=0.4.3 (from floyd-cli)
  Downloading shortuuid-0.5.0.tar.gz
Collecting tabulate>=0.7.7 (from floyd-cli)
  Downloading tabulate-0.7.7-py2.py3-none-any.whl
Collecting pathlib2>=2.2.1 (from floyd-cli)
  Downloading pathlib2-2.3.0-py2.py3-none-any.whl
Collecting args (from clint>=0.5.1->floyd-cli)
  Downloading args-0.1.0.tar.gz
Collecting chardet<3.1.0,>=3.0.2 (from requests>=2.12.4->floyd-cli)
  Downloading chardet-3.0.4-py2.py3-none-any.whl (133kB)
    100% |████████████████████████████████| 143kB 58kB/s 
Collecting urllib3<1.23,>=1.21.1 (from requests>=2.12.4->floyd-cli)
  Downloading urllib3-1.22-py2.py3-none-any.whl (132kB)
    100% |████████████████████████████████| 133kB 71kB/s 
Collecting idna<2.7,>=2.5 (from requests>=2.12.4->floyd-cli)
  Downloading idna-2.6-py2.py3-none-any.whl (56kB)
    100% |████████████████████████████████| 61kB 93kB/s 
Collecting certifi>=2017.4.17 (from requests>=2.12.4->floyd-cli)
  Downloading certifi-2017.7.27.1-py2.py3-none-any.whl (349kB)
    100% |████████████████████████████████| 358kB 172kB/s 
Collecting six (from pathlib2>=2.2.1->floyd-cli)
  Downloading six-1.11.0-py2.py3-none-any.whl
Building wheels for collected packages: floyd-cli, clint, shortuuid, args
  Running setup.py bdist_wheel for floyd-cli ... done
  Stored in directory: /Users/sterio/Library/Caches/pip/wheels/27/5e/b8/75d2e8df1a67c9a72a90d133bd565a86d8a48af0b0527215ed
  Running setup.py bdist_wheel for clint ... done
  Stored in directory: /Users/sterio/Library/Caches/pip/wheels/aa/65/4a/a0bceb0a6bee518b1dace4c803f24c4ac8febe55bdca0f14ed
  Running setup.py bdist_wheel for shortuuid ... done
  Stored in directory: /Users/sterio/Library/Caches/pip/wheels/0b/50/5e/fae6e070b59ef891e16b518376682f9b084491c1832b99cc34
  Running setup.py bdist_wheel for args ... done
  Stored in directory: /Users/sterio/Library/Caches/pip/wheels/0a/e0/66/35419f9f9ee41099a3631f0f308b9604bd1ffeabc066d69070
Successfully built floyd-cli clint shortuuid args
Installing collected packages: args, clint, chardet, urllib3, idna, certifi, requests, requests-toolbelt, marshmallow, shortuuid, tabulate, six, pathlib2, floyd-cli
  Found existing installation: chardet 2.3.0
    Uninstalling chardet-2.3.0:
      Successfully uninstalled chardet-2.3.0
  Found existing installation: idna 2.2
    Uninstalling idna-2.2:
      Successfully uninstalled idna-2.2
  Found existing installation: requests 2.13.0
    Uninstalling requests-2.13.0:
      Successfully uninstalled requests-2.13.0
  Found existing installation: six 1.10.0
    DEPRECATION: Uninstalling a distutils installed project (six) has been deprecated and will be removed in a future version. This is due to the fact that uninstalling a distutils project will only partially uninstall the project.
    Uninstalling six-1.10.0:
      Successfully uninstalled six-1.10.0
  Found existing installation: pathlib2 2.2.0
    Uninstalling pathlib2-2.2.0:
      Successfully uninstalled pathlib2-2.2.0
Successfully installed args-0.1.0 certifi-2017.7.27.1 chardet-3.0.4 clint-0.5.1 floyd-cli-0.10.9 idna-2.6 marshmallow-2.13.6 pathlib2-2.3.0 requests-2.18.4 requests-toolbelt-0.8.0 shortuuid-0.5.0 six-1.11.0 tabulate-0.7.7 urllib3-1.22

Login in to FloydHub through floyd-cli

login with floyd login command and copy token into terminal

steriowang:~ sterio$ floyd login
Authentication token page will now open in your browser. Continue? [Y/n]: y
Please copy and paste the authentication token.
This is an invisible field. Paste token and press ENTER: 
Login Successful
CLI authentication

Get code from Github with git clone + github repository url

steriowang:~ sterio$ git clone https://github.com/sterio-wang/Udacity-dlnd-image-classification-with-CIFAR-10-dataset
Cloning into 'Udacity-dlnd-image-classification-with-CIFAR-10-dataset'...
remote: Counting objects: 13, done.
remote: Total 13 (delta 0), reused 0 (delta 0), pack-reused 13
Unpacking objects: 100% (13/13), done.

cd cd + project nameand list all files with ls command in that repository

steriowang:~ sterio$ cd Udacity-dlnd-image-classification-with-CIFAR-10-dataset
steriowang:Udacity-dlnd-image-classification-with-CIFAR-10-dataset sterio$ ls
README.md           helper.py
dlnd_image_classification.html  problem_unittests.py
dlnd_image_classification.ipynb
steriowang:Udacity-dlnd-image-classification-with-CIFAR-10-dataset sterio$ 

It contains 5 files:

  • README.md
  • helper.py
  • dlnd_image_classification.html
  • problem_unittests.py
  • dlnd_image_classification.ipynb

Initialize selected project

Take jupyter notebook mode as example. Firstly initialize selected project byfloyd init + project name. Then run

$ floyd run --mode jupyter --gpu --env tensorflow

It will execute 4 things behind:

steriowang:Udacity-dlnd-image-classification-with-CIFAR-10-dataset sterio$ floyd run --mode jupyter --gpu --env tensorflow
Creating project run. Total upload size: 536.9KiB
Syncing code ...
[================================] 551280/551280 - 00:00:04

JOB NAME
-------------------------------------------------------------------------
sterio/projects/udacity-dlnd-image-classification-with-cifar-10-dataset/1

Setting up your instance and waiting for Jupyter notebook to become available ......

Path to jupyter notebook: https://www.floydhub.com/notebooks/vhiz2KgzPM8snPvi9MRqB2
  • Sync your local code to FloydHub's server
  • Provision a GPU instance on the cloud (if you want CPU, drop the --gpu flag)floyd run --mode jupyter --env tensorflow
  • Set up an deep learning environment with TensorFlow installed (because --env tensorflow)
  • Start a Jupyter server on the cloud, and open the url in your browser as:
Floyd Jupyter Server

After jupyter server page pops up then you can open and run the ipynb cell by cell just like running locally. It's recommended to use GPU for efficiency. Here is the output of my project: https://www.floydhub.com/notebooks/T4wUwkxFLHLebC4YkxUa8i/notebooks/dlnd_image_classification.ipynb

Supplementary

  • Monitor project status by command floyd status
steriowang:Udacity-dlnd-image-classification-with-CIFAR-10-dataset sterio$ floyd status
JOB NAME                                                                   CREATED        STATUS      DURATION(s)  INSTANCE    DESCRIPTION
-------------------------------------------------------------------------  -------------  --------  -------------  ----------  -------------
sterio/projects/udacity-dlnd-image-classification-with-cifar-10-dataset/5  8 minutes ago  running               0  g1
  • Delete a job by command floyd delete job name or Web UI
steriowang:Udacity-dlnd-image-classification-with-CIFAR-10-dataset sterio$ floyd delete sterio/projects/udacity-dlnd-image-classification-with-cifar-10-dataset/5
Delete Run: sterio/projects/udacity-dlnd-image-classification-with-cifar-10-dataset/5? [y/N]: y
Job HPLamsSwAyj7fNgh6YXdtH: Deleted
steriowang:Udacity-dlnd-image-classification-with-CIFAR-10-dataset sterio$ 
最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
  • 序言:七十年代末沐旨,一起剝皮案震驚了整個濱河市,隨后出現(xiàn)的幾起案子,更是在濱河造成了極大的恐慌,老刑警劉巖阁吝,帶你破解...
    沈念sama閱讀 219,539評論 6 508
  • 序言:濱河連續(xù)發(fā)生了三起死亡事件,死亡現(xiàn)場離奇詭異漠其,居然都是意外死亡诡渴,警方通過查閱死者的電腦和手機,發(fā)現(xiàn)死者居然都...
    沈念sama閱讀 93,594評論 3 396
  • 文/潘曉璐 我一進店門冯键,熙熙樓的掌柜王于貴愁眉苦臉地迎上來惹盼,“玉大人,你說我怎么就攤上這事惫确∈直ǎ” “怎么了?”我有些...
    開封第一講書人閱讀 165,871評論 0 356
  • 文/不壞的土叔 我叫張陵改化,是天一觀的道長掩蛤。 經(jīng)常有香客問我,道長陈肛,這世上最難降的妖魔是什么揍鸟? 我笑而不...
    開封第一講書人閱讀 58,963評論 1 295
  • 正文 為了忘掉前任,我火速辦了婚禮句旱,結(jié)果婚禮上阳藻,老公的妹妹穿的比我還像新娘。我一直安慰自己谈撒,他們只是感情好腥泥,可當我...
    茶點故事閱讀 67,984評論 6 393
  • 文/花漫 我一把揭開白布。 她就那樣靜靜地躺著啃匿,像睡著了一般蛔外。 火紅的嫁衣襯著肌膚如雪。 梳的紋絲不亂的頭發(fā)上溯乒,一...
    開封第一講書人閱讀 51,763評論 1 307
  • 那天夹厌,我揣著相機與錄音,去河邊找鬼橙数。 笑死,一個胖子當著我的面吹牛帅戒,可吹牛的內(nèi)容都是我干的灯帮。 我是一名探鬼主播,決...
    沈念sama閱讀 40,468評論 3 420
  • 文/蒼蘭香墨 我猛地睜開眼逻住,長吁一口氣:“原來是場噩夢啊……” “哼钟哥!你這毒婦竟也來了?” 一聲冷哼從身側(cè)響起瞎访,我...
    開封第一講書人閱讀 39,357評論 0 276
  • 序言:老撾萬榮一對情侶失蹤腻贰,失蹤者是張志新(化名)和其女友劉穎,沒想到半個月后扒秸,有當?shù)厝嗽跇淞掷锇l(fā)現(xiàn)了一具尸體播演,經(jīng)...
    沈念sama閱讀 45,850評論 1 317
  • 正文 獨居荒郊野嶺守林人離奇死亡冀瓦,尸身上長有42處帶血的膿包…… 初始之章·張勛 以下內(nèi)容為張勛視角 年9月15日...
    茶點故事閱讀 38,002評論 3 338
  • 正文 我和宋清朗相戀三年,在試婚紗的時候發(fā)現(xiàn)自己被綠了写烤。 大學時的朋友給我發(fā)了我未婚夫和他白月光在一起吃飯的照片翼闽。...
    茶點故事閱讀 40,144評論 1 351
  • 序言:一個原本活蹦亂跳的男人離奇死亡,死狀恐怖洲炊,靈堂內(nèi)的尸體忽然破棺而出感局,到底是詐尸還是另有隱情,我是刑警寧澤暂衡,帶...
    沈念sama閱讀 35,823評論 5 346
  • 正文 年R本政府宣布询微,位于F島的核電站,受9級特大地震影響狂巢,放射性物質(zhì)發(fā)生泄漏撑毛。R本人自食惡果不足惜,卻給世界環(huán)境...
    茶點故事閱讀 41,483評論 3 331
  • 文/蒙蒙 一隧膘、第九天 我趴在偏房一處隱蔽的房頂上張望代态。 院中可真熱鬧,春花似錦疹吃、人聲如沸蹦疑。這莊子的主人今日做“春日...
    開封第一講書人閱讀 32,026評論 0 22
  • 文/蒼蘭香墨 我抬頭看了看天上的太陽歉摧。三九已至,卻和暖如春腔呜,著一層夾襖步出監(jiān)牢的瞬間叁温,已是汗流浹背。 一陣腳步聲響...
    開封第一講書人閱讀 33,150評論 1 272
  • 我被黑心中介騙來泰國打工核畴, 沒想到剛下飛機就差點兒被人妖公主榨干…… 1. 我叫王不留膝但,地道東北人。 一個月前我還...
    沈念sama閱讀 48,415評論 3 373
  • 正文 我出身青樓谤草,卻偏偏與公主長得像跟束,于是被迫代替她去往敵國和親。 傳聞我的和親對象是個殘疾皇子丑孩,可洞房花燭夜當晚...
    茶點故事閱讀 45,092評論 2 355

推薦閱讀更多精彩內(nèi)容

  • 大雨阻擋我前行的路冀宴, 我可否在此處為這雨高歌。 生活在訴說著迷途温学, 不能束縛我腳步略贮。
    風淋濕了你閱讀 202評論 0 0
  • 回到酒店逃延,剛出電梯览妖,聽到走廊上有個小男孩在放聲大哭。我皺了皺眉頭真友。才剛剛八點黄痪,在公共場合如此吵鬧,想必會影響很多客...
    河之洲hz閱讀 165評論 3 0
  • 自從上了三中心課程后盔然,自以為情感充沛的我才發(fā)現(xiàn)原來自己是個情感壓制的人桅打,但今早一件溫暖的事情我試圖記錄下來,...
    小菲她三姐閱讀 311評論 0 2
  • 推薦此書愈案,此書是我最喜歡的五書之一挺尾,喜歡程度:排名第二。 這本書說的是: 盤古世界站绪,黃龍真人因突破失敗遭铺,穿越到異界...
    鹿也野閱讀 662評論 0 0