gpu_server_setup/setup_apps.sh

40 lines
1.1 KiB
Bash

#!/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 "\n"
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 && \
python3 -m pip install jupyterhub && \
npm install -g configurable-http-proxy && \
python3 -m pip install jupyterlab notebook tensorflow jupyterlab-git && \
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 "\n"
echo "Setup successfully finished"
fi
#check nvidia drivers
nvidia-smi