主要是安裝anaconda以及通過(guò)anaconda配置tensorflow,另外是github同步問(wèn)題。
Tensorflow配置
- 安裝anaconda3
官網(wǎng)上下載.sh文件安裝即可。但必須注意要source ~/.bashrc
否則沒(méi)有conda命令厕九。
- 配置tensorflow
很坑的是不能用pip或者pip3安裝庫(kù),否則就會(huì)出現(xiàn)python3.5和3.6不匹配的問(wèn)題而需要建立3.5的環(huán)境。應(yīng)該用conda命令安裝:conda install tensorflow
题翻,其他庫(kù):jupyter sklearn等等也是一樣。
github同步
由于需要server和host之間傳些小文件腰鬼,準(zhǔn)備用github當(dāng)中轉(zhuǎn)站嵌赠。
- ssh github
ssh-keygen //一路回車(chē)
cd ~/.ssh
cat id_rsa.pub
把內(nèi)容全部復(fù)制到github的ssh-key里,本地ssh -T git@github.com
嘗試一下熄赡。然后本地配置(應(yīng)該填什么都無(wú)所謂的):
git config --global user.name 'XXXX'
git config --global user.email 'XXXX@XXXX.com‘
- 無(wú)需帳號(hào)密碼上傳
cd
vim .git-credentials
填入https://{username}:{password}@github.com(用戶(hù)名有@要用%40)姜挺。然后:
git config --global credential.helper store
- 上傳文件
比如我的github上已經(jīng)有一個(gè)repository,先下載:
git clone {url}.git
把要上傳的文件放入文件夾彼硫,進(jìn)入目錄炊豪,依次執(zhí)行:
git add {some file}
git commit -m "some comment"
git push origin master
如果需要更新本地目錄(下載所有文件),直接git pull
拧篮。