Google Cloud Platform (GCP): Setting up a GPU-Based Virtual Machine (VM) with Jupyter Notebook for LLMs

Published

I’m working on a research project for my bachelor’s degree with two teammates: Akesh and Tharusha. We needed to train large language models (LLMs), which requires powerful computers and our personal computers just weren't enough for this task. Thankfully, Dr. Surangika and Dr. Nisansa: our project su helped us get access to Google Cloud Platform, where we can use more powerful machines. We tried setting up a computer with a GPU on Google Cloud by following various online guides, but none of them worked out at first.

After many hours of trying different methods, I finally set it up successfully. I wanted to share how I did it in this blog, hoping it can save time for anyone else who’s stuck like we were.

Installing NVIDIA drivers

1sudo apt-get install build-essential linux-headers-$(uname -r)

select Y

1gcc --version