申請(qǐng)與創(chuàng)建Amazon實(shí)例
申請(qǐng)Amazon實(shí)例并創(chuàng)建的過(guò)程其實(shí)相對(duì)簡(jiǎn)單,參考Amazon完備的文檔即可:
創(chuàng)建示例:http://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/EC2_GetStarted.html
我這里最終選擇了Amazon的Linux免費(fèi)實(shí)例
關(guān)于如何在AWS上配置云端服務(wù)器跑機(jī)器學(xué)習(xí)程序,以下列出各個(gè)問(wèn)題的解決方案和資源,方便隨時(shí)自取。
## 基礎(chǔ)級(jí)別
[Mac終端指令大全](http://www.itdecent.cn/p/3291de46f3ff)
[Vim指令大全](http://www.itdecent.cn/p/117253829581)
[vi指令大全](http://www.cnblogs.com/88999660/articles/1581524.html)
## AWS的EC2配置
[AWS Signup & Getting Started](http://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/EC2_GetStarted.html)
[Getting Started with Amazon EC2 Linux Instances](http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EC2_GetStarted.html)
[Connecting to Your Linux Instance Using SSH](http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/AccessingInstancesLinux.html)
## AWS的環(huán)境配置
[一文搞定所有配置--Jupyter, Plotly, Pandas, SciPy, NumPy and SciKit-Learn on AWS EC2](http://neuralfoundry.com/jupyter-plotly-pandas-scipy-numpy-and-scikit-learn-on-aws-ec2/)
[Optional: 上文的補(bǔ)充--Running a Jupyter Notebook](http://neuralfoundry.com/jupyter-plotly-pandas-scipy-numpy-and-scikit-learn-on-aws-ec2/)
## 如何讓任務(wù)掛在AWS上持續(xù)運(yùn)行
[Info: 需要用到Screen命令](https://stackoverflow.com/questions/26245942/how-do-i-leave-node-js-server-on-ec2-running-forever)
[如何在AWS上使用Screen命令: To update all packages on an Amazon Linux instance](http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/install-updates.html) ,這篇只看中間的一部分就行了。
常用的Screen命令包括:
Screen -ls
screen -r 17793
[ec2-user ~]$ exit
[screen is terminating]
## Trouble Shooting
[pip broken, reinstall doesn't work. EC2](https://stackoverflow.com/questions/34734436/pip-broken-reinstall-doesnt-work-ec2)
上文針對(duì)的報(bào)錯(cuò)信息為:
```pkg_resources.DistributionNotFound: The 'pip==6.1.1' distribution was not found and is required by the application
[ec2-user@ip-172-31-17-194 ~]$ which pip
/usr/local/bin/pip
```
其他的完整教程包括:
使用amazon ec2搭建gpu+keras的環(huán)境
https://hackernoon.com/keras-with-gpu-on-amazon-ec2-a-step-by-step-instruction-4f90364e49ac
最后,我使用了bitfusion的AMI鏡像,因?yàn)樗旧项A(yù)裝了所有可能會(huì)用到的工具,非常強(qiáng)大,check out教學(xué)視頻:
https://www.youtube.com/watch?v=zSZDm5-ymy4
To check 一切GPU驅(qū)動(dòng)安裝完好:
nvidia-smi

tensorflow/stream_executor/dso_loader.cc:135] successfully opened CUDA library libcublas.so.8.0 locally