This tutorial is performed on Ubuntu 24.04 in a VM. Steps mentioned are mostly applicable on Ubuntu. But, feel free to replicate the same on other Linux distributions and operating systems.Since OpenCoder is getting popular, I decided to quickly test it out as a local AI assistent to help me code in VS Code.Open a code file or project in VS Code (I’m using an empty docker-compose.yml
file).This extension serves as the interface between your VS Code environment and OpenCoder, allowing you to request code suggestions, completions, and more.Start engaging with the model by typing your queries or use it for code completions, suggestions, or any coding help you need:After installation, the extension should appear in the sidebar for easy access.
Table of Contents
Step 1: Install VS Code (if you don’t have it already)
Here’s how to set it up:
- Download VS Code for Ubuntu here.
- Once downloaded, open your terminal and install it by running:
Once complete, the model is now ready for use within CodeGPT.
Step 2: Install the CodeGPT Extension
📋Here’s a quick video of me interacting with the OpenCoder model inside VS Code using the CodeGPT extension.However, if data privacy and local processing are priorities, this approach still offers a solid alternative.
- Open VS Code.
- Click on the Extensions icon in the sidebar.
- Search for “CodeGPT” in the Extensions Marketplace.
- Select the extension and click “Install.”
localhost:11434
This new player is OpenCoder, an open-source Code LLM available in 1.5B and 8B models.
Step 3: Install Ollama
There are also several open source large language models specifically centered around coding like CodeGemma. And then we have a new player entering the scene and everyone talking about it.For developers handling sensitive code who want an AI copilot without relying on cloud services, Ollama and CodeGPT in VS Code is a worthwhile setup, balancing privacy and accessibility right on your desktop.In the terminal window, type:
In the CodeGPT panel, ensure Ollama is selected as your active provider.
Step 4: Download Opencoder model with Ollama
sudo dpkg -i ./<downloaded-file>.deb
ollama run opencoder
First, ensure that Visual Studio Code is installed on your system. If not, follow these steps to get it set up:
With CodeGPT and Ollama installed, you’re ready to download the Opencoder model:
Step 5: Run your Copilot AI with opencoder
Ollama is an essential tool for managing and deploying language models locally. It simplifies the process of downloading and running models locally, making it a crucial component for this setup.As an extension for VS Code, it integrates seamlessly, providing instant code suggestions, completions, and debugging insights right where I need them.
curl -fsSL https://ollama.com/install.sh | sh
Programming is the one area where AI is being used extensively. Most editors allow you to add AI agents like chatGPT, Microsoft’s Copilot etc.
After testing OpenCoder with Ollama on my Ubuntu VM setup, I found that while the performance wasn’t as snappy as cloud-based AI services like ChatGPT, it was certainly functional for most coding tasks.
Conclusion
CodeGPT is a powerful tool that I’ve found invaluable for boosting productivity and simplifying coding workflows. Next, it’ll ask you to select the model. I’ve downloaded both version of Opencoder with 1.5B & 8B parameters but I’ll be using the former:We have also covered Ollama installation steps in detail, in case you need that.The responsiveness can vary, especially on modest hardware, so performance is a bit subjective depending on your setup and expectations.