#!/bin/bash if [ "$EUID" -ne 0 ] then echo "Please run as root" exit fi #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 #add public ssh keys if [ ! -s "~/.ssh/authorized_keys" ]; then cat id_*.pub >> ~/.ssh/authorized_keys fi echo "" echo "Install and config python & jupyter..." apt-get update && \ apt-get install -y ipmitool && modprobe ipmi_devintf && \ apt-get install -y python3-pip nodejs npm git && \ apt-add-repository -y ppa:cantera-team/cantera && \ apt-get install -y cantera-python3 && \ python3 -m pip install jupyterhub && \ npm install -g configurable-http-proxy && \ python3 -m pip install jupyterlab notebook jupyterlab-git tensorflow && \ python3 -m pip install h5py tqdm 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 if [ $? -eq 0 ]; then echo "check nvidia drivers..." nvidia-smi echo "" echo "Setup successfully finished" fi