1. 系统配置文件
ubuntu配置文件一般都在.bashrc
或.profile
中,mac在.bashprofile
中
2. 安装低版本tensorflow
How to download previous version of tensorflow? (tf0.11没有gpu版本)
3. .sh文件运行
- source FILENAME.sh
- chmod u+x FILENAME.sh
4. GPU监视
watch -n 10 nvidia-smi
5. Ubuntu安装pyenv
$ curl -L https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer | bash
.bashrc中配置路径
export PYENV_ROOT="$HOME/.pyenv" export PATH="$PYENV_ROOT/bin:$PATH" eval "$(pyenv init -)"
6. Ubuntu查看系统日志
tail /var/log/messages
if not:
vim /etc/rsyslog.d/50-default.conf
将下面代码的注释取消,并wq保存退出
#*.=info;*.=notice;*.=warn;\ # auth,authpriv.none;\ # cron,daemon.none;\ # mail,news.none -/var/log/messages
重启rsyslog系统
sudo service rsyslog restart
7. If Linux interface is stucked…
alt+ctrl+F1
come into command line mode, thenalt+ctrl+F7
come into GUI mode.
8. Set up the permanent alias for a complicated command line
vim ~/.bashrc
add alias NewName='The Original Command Line'
to .basrc
,
then source ~/.bashrc
9. Check the on-going backend scripts
ps aux | grep py
10. Run the code without interrupting
nohup python -u script.py
11. Redirect nohup file to another file
nohup some_command &> NEW_name.out&