changed from tensorflow to tensorflow-gpu and switched to use nodesource.com for a more recent nodejs
This commit is contained in:
parent
250b0da175
commit
0d573fce40
|
@ -18,12 +18,13 @@ echo ""
|
|||
echo "Install and config python & jupyter..."
|
||||
apt-get update && \
|
||||
apt-get install -y ipmitool && modprobe ipmi_devintf && \
|
||||
curl -fsSL https://deb.nodesource.com/setup_current.x | bash - \
|
||||
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 jupyterlab notebook jupyterlab-git tensorflow-gpu && \
|
||||
python3 -m pip install h5py tqdm pandas ipywidgets pillow matplotlib && \
|
||||
python3 -m pip install scipy scikit-learn && \
|
||||
mkdir /etc/jupyterhub/ && \
|
||||
|
@ -32,6 +33,8 @@ cp jupyterhub.service /etc/systemd/system/jupyterhub.service && \
|
|||
systemctl enable jupyterhub && \
|
||||
systemctl start jupyterhub
|
||||
|
||||
|
||||
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "check nvidia drivers..."
|
||||
nvidia-smi
|
||||
|
|
|
@ -3,18 +3,32 @@
|
|||
#sources:
|
||||
#https://wiki.archlinux.org/title/bcache
|
||||
#https://stackoverflow.com/questions/20797819/command-to-change-the-default-home-directory-of-a-user
|
||||
#https://unix.stackexchange.com/questions/156102/optimizing-bcache
|
||||
#https://evilpiepirate.org/git/linux-bcache.git/tree/Documentation/bcache.txt
|
||||
|
||||
#Block device for caching (e.g. disk or partition):
|
||||
ssddev=/dev/sdb
|
||||
hdddev=/dev/sdc
|
||||
sequential_cutoff=24000M
|
||||
|
||||
if [ "$EUID" -ne 0 ]
|
||||
then echo "Please run as root"
|
||||
#Block device to use with cache:
|
||||
hdddev=/dev/sdc
|
||||
|
||||
#Cache sequential writes files, no cutoff
|
||||
#There is an issue with parsing of prefixes, max 4 GB
|
||||
sequential_cutoff=0
|
||||
|
||||
if [ "$EUID" -ne 0 ]; then
|
||||
echo "Please run as root"
|
||||
exit
|
||||
fi
|
||||
|
||||
while [ -b /dev/bcache0 ]
|
||||
then echo "Canceld, device /dev/bcache0 is allready present"
|
||||
read -p "Block devices $ssddev and $hdddev will be wiped, are you sure proceed?" -n 1 -r
|
||||
echo
|
||||
if [[ ! $REPLY =~ ^[Yy]$ ]]; then
|
||||
exit
|
||||
fi
|
||||
|
||||
while [ -b /dev/bcache0 ]; then
|
||||
echo "Canceld, device /dev/bcache0 is allready present"
|
||||
exit
|
||||
fi
|
||||
|
||||
|
|
|
@ -0,0 +1,43 @@
|
|||
#!/bin/bash
|
||||
|
||||
echo "Not working yet"
|
||||
exit
|
||||
|
||||
if [ "$EUID" -ne 0 ]
|
||||
then echo "Please run as root"
|
||||
exit
|
||||
fi
|
||||
|
||||
apt-get update && \
|
||||
apt-get install -y hibernate uswsusp
|
||||
|
||||
SWAPFILE="/swap.img"
|
||||
#UUID=$(findmnt -no UUID -T $SWAPFILE) <-- wrong?
|
||||
swaplabel $SWAPFILE
|
||||
|
||||
OFFSET=$(swap-offset $SWAPFILE) #<---------- remove "resume offset ="
|
||||
|
||||
|
||||
if [ $? -eq 0 ]; then
|
||||
#change swapfile size
|
||||
swapoff -a && \
|
||||
dd if=/dev/zero of=$SWAPFILE bs=1G count=32 && \
|
||||
mkswap $SWAPFILE && \
|
||||
swapon $SWAPFILE
|
||||
|
||||
#show info
|
||||
grep SwapTotal /proc/meminfo
|
||||
fi
|
||||
|
||||
|
||||
|
||||
#modify /etc/default/grub:
|
||||
#GRUB_CMDLINE_LINUX_DEFAULT="resume=UUID=c081f414-93bf-4f07-8b28-97f8acd3b052 resume_offset=10555392"
|
||||
|
||||
echo "RESUME=UUID=$UUID resume_offset=$OFFSET" > /etc/initramfs-tools/conf.d/resume
|
||||
|
||||
#Apply settings:
|
||||
update-grub
|
||||
update-initramfs -u -k all
|
||||
|
||||
#test with: sudo hibernate
|
Loading…
Reference in New Issue