Compare commits
No commits in common. "0d573fce409af77fa767332d73e68362a7b54a76" and "b8514bb166d551d61d5c244207da1eed2932e662" have entirely different histories.
0d573fce40
...
b8514bb166
|
@ -52,7 +52,3 @@ Tune bcache (not permanent):
|
|||
|
||||
echo 64M > /sys/block/bcache0/bcache/sequential_cutoff
|
||||
echo 4096 > /sys/block/bcache0/queue/read_ahead_kb
|
||||
|
||||
### Fan-temperature control for GPUs
|
||||
- [NVIDIA GPU-based FAN controller for SUPERMICRO server](https://github.com/skokec/superfans-gpu-controller)
|
||||
- [Modification for combined GPU/CPU temperature control in 1U server](https://repos.nonan.net/nicolas/superfans-gpu-controller)
|
|
@ -18,13 +18,12 @@ 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-gpu && \
|
||||
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/ && \
|
||||
|
@ -33,8 +32,6 @@ 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,32 +3,18 @@
|
|||
#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
|
||||
|
||||
#Block device to use with cache:
|
||||
hdddev=/dev/sdc
|
||||
sequential_cutoff=24000M
|
||||
|
||||
#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"
|
||||
if [ "$EUID" -ne 0 ]
|
||||
then echo "Please run as root"
|
||||
exit
|
||||
fi
|
||||
|
||||
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"
|
||||
while [ -b /dev/bcache0 ]
|
||||
then echo "Canceld, device /dev/bcache0 is allready present"
|
||||
exit
|
||||
fi
|
||||
|
||||
|
|
|
@ -1,43 +0,0 @@
|
|||
#!/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