some changes..
This commit is contained in:
parent
973bb7937d
commit
27683ede62
44
setup01.sh
44
setup01.sh
|
@ -1,52 +1,48 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
if [ "$EUID" -ne 0 ]
|
|
||||||
then echo "Please run as root"
|
|
||||||
exit
|
|
||||||
fi
|
|
||||||
|
|
||||||
#----------- Notes ------------------
|
#----------- Notes ------------------
|
||||||
#check for NVIDIA device:
|
#check for NVIDIA device:
|
||||||
#apt-get -y install pciutils
|
#apt-get -y install pciutils
|
||||||
#lspci | grep VGA
|
#lspci | grep VGA
|
||||||
#check if driver works with device:
|
#check if driver works with device:
|
||||||
#nvidia-smi
|
#nvidia-smi
|
||||||
#------------------------------------
|
|
||||||
|
|
||||||
|
|
||||||
#Install drivers
|
|
||||||
#based on https://docs.nvidia.com/cuda/cuda-installation-guide-linux/
|
#based on https://docs.nvidia.com/cuda/cuda-installation-guide-linux/
|
||||||
#and https://www.tensorflow.org/install/gpu
|
#and https://www.tensorflow.org/install/gpu
|
||||||
#Versions required: https://www.tensorflow.org/install/source#gpu
|
#Versions required: https://www.tensorflow.org/install/source#gpu
|
||||||
|
#------------------------------------
|
||||||
|
|
||||||
apt-get update
|
if [ "$EUID" -ne 0 ]
|
||||||
apt-get install linux-headers-$(uname -r)
|
then echo "Please run as root"
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
|
||||||
#Set CUDA network repository to have priority
|
|
||||||
#wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/cuda-ubuntu1804.pin
|
|
||||||
#mv cuda-ubuntu1804.pin /etc/apt/preferences.d/cuda-repository-pin-600
|
|
||||||
|
|
||||||
#Install the CUDA repository public GPG key
|
|
||||||
distribution=$(. /etc/os-release;echo $ID$VERSION_ID | sed -e 's/\.//g')
|
distribution=$(. /etc/os-release;echo $ID$VERSION_ID | sed -e 's/\.//g')
|
||||||
apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/$distribution/x86_64/7fa2af80.pub
|
architecture="x86_64"
|
||||||
add-apt-repository contrib
|
|
||||||
|
#Install drivers
|
||||||
|
apt-get update
|
||||||
|
apt-get install -y linux-headers-$(uname -r) software-properties-common
|
||||||
|
|
||||||
#Setup the CUDA network repository
|
#Setup the CUDA network repository
|
||||||
add-apt-repository "deb https://developer.download.nvidia.com/compute/cuda/repos/$distribution/x86_64/ /"
|
add-apt-repository "deb https://developer.download.nvidia.com/compute/cuda/repos/$distribution/$architecture/ /"
|
||||||
|
|
||||||
|
#Install the CUDA repository public GPG key
|
||||||
|
apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/$distribution/$architecture/7fa2af80.pub
|
||||||
|
add-apt-repository contrib
|
||||||
|
|
||||||
#Installs all CUDA Toolkit and Driver packages. Handles upgrading to the next version of the cuda package when it's released.
|
#Installs all CUDA Toolkit and Driver packages. Handles upgrading to the next version of the cuda package when it's released.
|
||||||
#Use the --no-install-recommends option for a lean driver install without any dependencies on X packages
|
#Use the --no-install-recommends option for a lean driver install without any dependencies on X packages
|
||||||
apt-get update
|
apt-get update
|
||||||
apt-get install --no-install-recommends cuda-11-2
|
apt-get install -y --no-install-recommends cuda-11-2
|
||||||
#apt-get install --no-install-recommendslibcudnn8=8.1.0.44-1+cuda11.2 libcudnn8-dev=8.1.0.44-1+cuda11.2
|
#apt-get install --no-install-recommends libcudnn8=8.1.0.44-1+cuda11.2 libcudnn8-dev=8.1.0.44-1+cuda11.2
|
||||||
|
|
||||||
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/libcudnn8_8.1.1.33-1+cuda11.2_amd64.deb
|
#Latest available version from ubuntu1804 repo:
|
||||||
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/libcudnn8-dev_8.1.1.33-1+cuda11.2_amd64.deb
|
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/libcudnn8_8.1.1.33-1+cuda11.2_amd64.deb
|
||||||
|
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/libcudnn8-dev_8.1.1.33-1+cuda11.2_amd64.deb
|
||||||
apt install ./libcudnn8_8.1.1.33-1+cuda11.2_amd64.deb
|
apt install ./libcudnn8_8.1.1.33-1+cuda11.2_amd64.deb
|
||||||
apt install ./libcudnn8-dev_8.1.1.33-1+cuda11.2_amd64.deb
|
apt install ./libcudnn8-dev_8.1.1.33-1+cuda11.2_amd64.deb
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#reboot system
|
#reboot system
|
||||||
#systemctl reboot
|
#systemctl reboot
|
||||||
echo "Please reboot system"
|
echo "Please reboot system"
|
||||||
|
|
41
setup02.sh
41
setup02.sh
|
@ -5,28 +5,25 @@ if [ "$EUID" -ne 0 ]
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
|
||||||
apt-get update
|
#apt-get install -y --no-install-recommends libnvinfer7=7.1.3-1+cuda11.0 \
|
||||||
|
# libnvinfer-dev=7.1.3-1+cuda11.0 \
|
||||||
|
# libnvinfer-plugin7=7.1.3-1+cuda11.0
|
||||||
|
|
||||||
apt-get install -y --no-install-recommends libnvinfer7=7.1.3-1+cuda11.0 \
|
apt-get update && \
|
||||||
libnvinfer-dev=7.1.3-1+cuda11.0 \
|
apt-get install -y ipmitool && modprobe ipmi_devintf && \
|
||||||
libnvinfer-plugin7=7.1.3-1+cuda11.0
|
apt-get install -y python3-pip nodejs npm git && \
|
||||||
|
python3 -m pip install jupyterhub && \
|
||||||
|
npm install -g configurable-http-proxy && \
|
||||||
apt-get install sudo
|
python3 -m pip install jupyterlab notebook tensorflow jupyterlab-git && \
|
||||||
apt-get install ipmitool && modprobe ipmi_devintf
|
python3 -m pip install tqdm pickle pandas ipywidgets pillow matplotlib && \
|
||||||
apt-get install python3-pip nodejs npm git
|
python3 -m pip install scipy scikit-learn && \
|
||||||
|
mkdir /etc/jupyterhub/ && \
|
||||||
python3 -m pip install jupyterhub
|
cp jupyterhub_config.py /etc/jupyterhub/jupyterhub_config.py && \
|
||||||
npm install -g configurable-http-proxy
|
cp jupyterhub.service /etc/systemd/system/jupyterhub.service && \
|
||||||
python3 -m pip install jupyterlab notebook tensorflow jupyterlab-git
|
systemctl enable jupyterhub && \
|
||||||
python3 -m pip install tqdm pickle pandas ipywidgets pillow matplotlib
|
|
||||||
python3 -m pip install scipy scikit-learn
|
|
||||||
|
|
||||||
mkdir /etc/jupyterhub/
|
|
||||||
cp jupyterhub_config.py /etc/jupyterhub/jupyterhub_config.py
|
|
||||||
cp jupyterhub.service /etc/systemd/system/jupyterhub.service
|
|
||||||
|
|
||||||
systemctl enable jupyterhub
|
|
||||||
systemctl start jupyterhub
|
systemctl start jupyterhub
|
||||||
|
|
||||||
#Add sudo users with: usermod -aG sudo USER
|
#check nvidia drivers
|
||||||
|
nvidia-smi
|
||||||
|
|
||||||
|
echo "Add sudo users with: usermod -aG sudo USER"
|
Loading…
Reference in New Issue