This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Assumes starting from a clean install of ubuntu and running a nvidia graphics card | |
#Install NVIDIA drivers and disable noveuax generic drivers | |
#TODO | |
#purge the ones you have | |
sudo apt-get remove --purge '^nvidia-.*' | |
sudo apt-get remove --purge '^libnvidia-.*' | |
sudo apt-get remove --purge '^cuda-.*' | |
sudo apt autoremove | |
#download the latest runfile from nvidia and follow the install instructions |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#build a swap file as you'll oom | |
sudo swapon --show | |
sudo fallocate -l 1G /swapfile | |
sudo dd if=/dev/zero of=/swapfile bs=1024 count=1048576 | |
sudo chmod 600 /swapfile | |
sudo mkswap /swapfile | |
sudo swapon /swapfile | |
echo "/swapfile swap swap defaults 0 0" | sudo tee -a /etc/fstab | |
sudo swapon --show | |
sudo free -h |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#if you used the defaults from course.fast.ai this should work. Change your DEST_ZONE to match the target zone | |
#check which zones have K80 GPU: | |
gcloud beta compute accelerator-types list | grep k80 | |
#define your disk name, instance name, and source and target zones | |
export INSTANCE_NAME="my-fastai-instance" | |
export SOURCE_ZONE="us-west2-b" | |
export DEST_ZONE="asia-east1-b" | |
export DISK_NAME="my-fastai-instance" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Create a new Lightsail instance (the smallest one seems to support it) | |
Use the Bitnami node.js template | |
Paste this in as a Launch Script: | |
#better launch script - installs current versions of docker components. | |
sudo apt-get remove -y docker docker-engine docker.io containerd runc | |
sudo apt-get update -y | |
sudo apt-get install -y apt-transport-https ca-certificates curl gnupg-agent software-properties-common | |
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Follow instructions from older version of https://course.fast.ai/start_gcp.html | |
Step 1: Creating your account | |
Cloud computing allows users access to virtual CPU or GPU resources on an hourly rate, depending on the hardware configuration. Find more information in the Google Cloud Platform documentation. In case you don’t have a GCP account yet, you can create one here, which comes with $300 worth of usage credits for free. | |
Potential roadblock: Even though GCP provides a $300 initial credit, you must enable billing to use it. You can put a credit card or a bank account but the latter will take several days for the activation. | |
The project on which you are going to run the image needs to be linked with your billing account. For this navigate to the billing dashboard, click the ‘…’ menu and choose ‘change billing account’. | |
Step 2: Install Google CLI |