ubuntu升级软件但是禁用内核升级(我终于找到了nvidia-smi总是开机之后不能使用,无法使用显卡进行深度学习训练的原因了!!!!)

之前一直会遇到不规律的开机之后显卡invidia-smi不能使用,如果需要重新使用显卡来进行模型训练必须重新装显卡驱动的情况。

这次终于找到真实的原因了,这是杀千刀的 Linux内核更新!之前居然一直不知道。。。还是自己太菜太菜了

sudo apt-mark hold linux-image-generic linux-headers-generic

ps。做一个记录,现在是55,看以后会不会变

ubuntu升级软件但是禁用内核升级

Contents [ hide] 
  • 1 Purpose
  • 2 Environment
  • 3 Single Line
  • 4 Disable Kernel Updates
  • 5 Updates Apt-Get Local DB
  • 6 Install Upgrades
  • 7 Enable Kernel Updates
  • 8 Related Articles
  • 9 Sources

Purpose

This article gives the steps to upgrade all the apt-get packages without updating the kernel on Ubuntu CLI.


Environment

  • Ubuntu 14/15


Single Line

The sleep is to give a little time for the lock file to release after updating.

sudo apt-mark hold linux-image-generic linux-headers-generic && sudo apt-get update && sleep 1 && sudo apt-get upgrade -y && sudo apt-mark unhold linux-image-generic linux-headers-generic


Disable Kernel Updates

sudo apt-mark hold linux-image-generic linux-headers-generic


Updates Apt-Get Local DB

sudo apt-get update


Install Upgrades

sudo apt-get upgrade -y


Enable Kernel Updates

sudo apt-mark unhold linux-image-generic linux-headers-generic


Related Articles

  • Reference: Apt-Get


你可能感兴趣的:(物联网专业相关)