Download aws_first_launch_setup.sh from arot/setup_scripts: direct link, hf CLI and curl.
- Browser
- Download file 1.11 kB
-
https://huggingface.co/arot/setup_scripts/resolve/main/aws_first_launch_setup.sh
- Command line
-
hf download hf://arot/setup_scripts/aws_first_launch_setup.sh
-
curl -L -o aws_first_launch_setup.sh https://huggingface.co/arot/setup_scripts/resolve/main/aws_first_launch_setup.sh
1.11 kB
| # Remove junk files | |
| cd ~/ | |
| rm BUILD_FROM_SOURCE_PACKAGES_LICENCES LINUX_PACKAGES_LICENSES LINUX_PACKAGES_LIST PYTHON_PACKAGES_LICENSES THIRD_PARTY_SOURCE_CODE_URLS | |
| rm -rf nvidia-acknowledgements | |
| # Format nvme1n1 | |
| sudo mkfs -t xfs /dev/nvme1n1 | |
| # Create and mount /data directory | |
| sudo mkdir -p /data | |
| sudo mount /dev/nvme1n1 /data | |
| # Set appropriate permissions for /data (consider more restrictive permissions) | |
| sudo chmod 777 /data | |
| # Fetch UUID of nvme1n1 and make the /data mount permanent | |
| UUID=$(sudo blkid -s UUID -o value /dev/nvme1n1) | |
| echo "UUID=$UUID /data xfs defaults 0 2" | sudo tee -a /etc/fstab | |
| # Link webui directory to nvme | |
| mkdir -p ~/webui | |
| mkdir -p /data/webui | |
| ln -s /data/webui/ ~/webui/ | |
| # Setup swap | |
| sudo swapoff -a # Turn off all swap spaces | |
| sudo mkdir -p /data/.swap/ | |
| if [ ! -f "/data/.swap/swapfile" ]; then | |
| sudo dd if=/dev/zero of=/data/.swap/swapfile bs=1G count=16 | |
| sudo chmod 600 /data/.swap/swapfile | |
| sudo mkswap /data/.swap/swapfile | |
| sudo swapon /data/.swap/swapfile | |
| fi | |
| sudo swapon --show | |
| # Other settings | |
| git config --global credential.helper store | |