2022-03-12 00:42:12 +00:00
|
|
|
#!/bin/bash
|
2022-05-05 08:41:19 +00:00
|
|
|
set -e
|
2022-03-12 00:42:12 +00:00
|
|
|
|
|
|
|
if [ "$EUID" -ne 0 ]
|
|
|
|
then echo "Please run as root"
|
|
|
|
exit
|
|
|
|
fi
|
|
|
|
|
2022-03-13 21:23:12 +00:00
|
|
|
#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
|
|
|
|
|
2022-03-16 00:35:27 +00:00
|
|
|
#add public ssh keys
|
|
|
|
if [ ! -s "~/.ssh/authorized_keys" ]; then
|
|
|
|
cat id_*.pub >> ~/.ssh/authorized_keys
|
|
|
|
fi
|
|
|
|
|
2022-03-17 15:03:07 +00:00
|
|
|
echo ""
|
2022-05-05 08:41:19 +00:00
|
|
|
echo "Install supermicro system tools..."
|
|
|
|
apt-get update
|
|
|
|
apt-get install -y ipmitool && modprobe ipmi_devintf
|
|
|
|
|
|
|
|
echo "Install a recent notejs for jupyterhub from nodesource..."
|
|
|
|
curl -fsSL https://deb.nodesource.com/setup_current.x | bash -
|
|
|
|
apt-get install -y nodejs npm
|
|
|
|
|
|
|
|
echo "Install JupyterHub..."
|
|
|
|
apt-get install -y language-pack-de python3-pip
|
|
|
|
python3 -m pip install jupyterhub
|
|
|
|
npm install -g configurable-http-proxy
|
|
|
|
python3 -m pip install jupyterlab notebook jupyterlab-git
|
|
|
|
jupyter labextension install @jupyterlab/server-proxy
|
2022-05-09 13:18:47 +00:00
|
|
|
jupyter labextension install jupyter-matplotlib
|
2022-05-05 08:41:19 +00:00
|
|
|
|
|
|
|
echo "Setup JupyterHub..."
|
|
|
|
mkdir /etc/jupyterhub/
|
|
|
|
cp jupyterhub_config.py /etc/jupyterhub/jupyterhub_config.py
|
|
|
|
cp jupyterhub.service /etc/systemd/system/jupyterhub.service
|
|
|
|
systemctl enable jupyterhub
|
2022-03-16 00:35:27 +00:00
|
|
|
systemctl start jupyterhub
|
|
|
|
|
2022-05-05 08:41:19 +00:00
|
|
|
echo "Install Tensorflow..."
|
|
|
|
python3 -m pip install tensorflow-gpu
|
2022-03-22 09:40:49 +00:00
|
|
|
|
2022-05-05 08:41:19 +00:00
|
|
|
echo "Install cantera..."
|
|
|
|
apt-add-repository -y ppa:cantera-team/cantera
|
|
|
|
apt-get install -y cantera-python3
|
2022-03-22 09:40:49 +00:00
|
|
|
|
2022-05-05 08:41:19 +00:00
|
|
|
echo "Install common Python libs..."
|
2022-05-09 13:18:47 +00:00
|
|
|
python3 -m pip install h5py tqdm pandas ipywidgets pillow matplotlib ipympl opencv-python
|
2022-05-05 08:41:19 +00:00
|
|
|
#python3 -m pip install scipy scikit-learn numba
|
|
|
|
|
|
|
|
#System monitoring
|
|
|
|
#echo "Install netdata..."
|
|
|
|
#wget -O /tmp/netdata-kickstart.sh https://my-netdata.io/kickstart.sh && sh /tmp/netdata-kickstart.sh
|
|
|
|
#echo "nvidia_smi: yes" >> /usr/lib/netdata/conf.d/python.d.conf
|
|
|
|
#service netdata restart
|
|
|
|
#on http://0.0.0.0:19999
|
|
|
|
|
|
|
|
echo "Install gpuview..."
|
|
|
|
python3 -m pip install gpuview
|
|
|
|
gpuview service --host 127.0.0.1 --port 9988
|
|
|
|
|
|
|
|
echo "Disable services that delays startup by wating for network connectivity..."
|
|
|
|
systemctl disable cloud-config
|
|
|
|
systemctl disable cloud-final.service
|
|
|
|
systemctl disable iscsid.service
|
|
|
|
systemctl disable open-iscsi.service
|
|
|
|
|
|
|
|
|
|
|
|
echo "show gpu state..."
|
|
|
|
nvidia-smi
|
|
|
|
|
|
|
|
echo ""
|
|
|
|
echo "Setup successfully finished"
|
2022-03-17 13:14:49 +00:00
|
|
|
|
2022-03-13 21:23:12 +00:00
|
|
|
|
2022-03-17 13:14:49 +00:00
|
|
|
|