Skip to content

Instantly share code, notes, and snippets.

@ahmedmos
Created June 29, 2017 11:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ahmedmos/4bbaa626593aba00728149b89e1c80a2 to your computer and use it in GitHub Desktop.
Save ahmedmos/4bbaa626593aba00728149b89e1c80a2 to your computer and use it in GitHub Desktop.
this to be placed inside ~/.vnc/xstartup
#!/bin/sh
# Add the following line to ensure you always have an xterm available.
( while true ; do xterm ; done ) &
# Uncomment the following two lines for normal desktop:
unset SESSION_MANAGER
exec /etc/X11/xinit/xinitrc
[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &
xterm -geometry 80×24+10+10 -ls -title “$VNCDESKTOP Desktop” &
#twm &
startkde &
======================
Installing the NVIDIA 375.51 Driver and CUDA 8 on AWS G2 Instances
Note that the existing CUDA 8 installer packages contain a version of the driver (375.26) that does not support the K520 GPU and thus additional steps are required to get started with using CUDA on the AWS EC2 G2 instances. One of the easier ways to install drivers and CUDA is to use the network installation package to install the NVIDIA 375.51 driver and the toolkit. For simplicity, these instructions will refer to the steps on an Ubuntu system using the APT package manager. The same instructions will apply when using other package managers such as yum or zypper.
Update the CUDA network repo keys using the following command
# sudo apt-key adv --fetch-keys
http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/7fa2af80.pub
Add the CUDA network repo and update the package lists on your system to get new versions of the software and their dependencies.
# sudo sh -c 'echo "deb
http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64 /" > /etc/apt/sources.list.d/cuda.list'
# sudo apt-get update
If you already have CUDA 8 installed on your instance and only need to update the NVIDIA driver, install the cuda-drivers meta-package. Then reboot the instance to complete the installation of the 375.51 NVIDIA driver.
# sudo apt-get -y --no-install-recommends install cuda-drivers
# sudo reboot
If you also need to install the CUDA toolkit, then install the cuda-toolkit-8-0 meta-package to download and install CUDA 8.
# sudo apt-get -y install cuda-toolkit-8-0
Refer to the Linux Installation Guide for CUDA Toolkit for more information on using runfiles or local installers to install CUDA on various Linux distributions. The guide is located at the following URL: (http://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment