Before you launch a GPU instance, you need to make sure that your quota is set to 1 or however many GPUs you want to use. The quota is essentially a limit on the number of GPUs that you can use.
To increase your quota, search Quota in the search bar and click on All Quotas. Once you have done this, your screen should look something like this.
Now, use the filter button, the thing with the three horizontal bars on the upper left corner of the screen, to filter the results. First, select ‘Limit Name’ and then select ‘GPUs (all regions)’. You should have a screen like this:
Click on the ‘ALL QUOTAS’ button, and you should have a page that shows the Global Quota. Select this, and then select Edit Quotas. You should have a screen like this:
Change the GPU limit to the number of GPUs you want. I usually only need one GPU. Add a short description, and submit your request. Your request for the quota increase usually gets answered within a couple of hours or 1-2 days at the max.
Something important to keep in mind is the amount of GPU memory your project will need. If your model or input is extremely large, then you may use a lot of GPU memory, and increasing the RAM when you create your instance doesn’t fix this. From my experience, there is one way to increase your GPU memory: by increasing the number of GPUs that you use. This chart shows how much GPU memory each type of GPU has. This is a fixed number, and can not be changed. Not increasing your GPU memory will result in a CUDA out of memory error, so it is vital that you make sure your fix this problem if it applies to you.
If your quota increase request has been approved, you will get an email notifying you of this. Now, you can actually launch the Jupyter Notebook.
Go back to your dashboard. Select the navigation menu and on the navigation menu, select AI Platform -> Notebooks.
Once you have done this, select Create New Instance. You will get the option to either use a pre-built notebook that Google has made, or you can create a custom instance. Usually, I just make a custom notebook because it allows for more flexibility.
You can call your instance whatever you want, and you can select any region that you want. However, different regions may have different GPUs available, so make sure that you select a region that contains the GPU that you want to use.
Now you can customize whatever environment/library you want to use(Pytorch/Tensorflow), the RAM that you want, the GPU that you want to use, and the number of GPUs you want to use. Make sure that this number is no greater than the Quota you specified. You’ll see the cost of the respective GPU that you choose on the side. Personally, I like using the Nvidia V100 because it is one of the best GPUs to use for deep learning, so my cost is 1.877 dollars per hour.
Select Create Instance. You now have a working notebook to use! In order to start the instance, select the notebook you want to use and start.
From this point on, your Jupyter Notebook should have launched and be working. You can upload, download and save files, regularly.
When you are done using the GPU, make sure to stop it, otherwise, you will continue being charged.