Ubuntu for AI Engineering
Table of Contents
This article was originally posted on the Ubuntu Discourse, and is reposted here. I welcome comments and further discussion in that thread.
AI-assisted tooling is becoming more and more common in the workflows of engineers at all experience levels. As I see it, our challenge is one of consideration, enablement and constraint. We must enable those who opt-in to safely and responsibly harness the power of these tools, while respecting those who do not wish to have their platform defined or overwhelmed by this class of software.
The use of AI is a divisive topic among the tech community. I find myself a little in both camps, somewhere between skeptic and advocate. While I’m quick to acknowledge the negative impacts that the use of LLMs can have on open source projects, I’m also surrounded by examples where it has been used responsibly to great effect.
Examples of this include Filippo’s article debugging low-level cryptography with Claude Code, Mitchell’s article on Vibing a Non-Trivial Ghostty Feature, and David’s article How I Program with Agents. These articles come from engineers with proven expertise in careful, precise software engineering, yet they share an important sentiment: AI-assisted tools can be a remarkable force-multiplier when used in conjunction with their lived experience, but care must still be taken to avoid poor outcomes.
The aim of this post is not to convince you to use AI in your work, but rather to introduce the elements of Ubuntu that make it a first-class platform for experimentation and development.
I want to enable those who want to develop safely and responsibly with AI tools, without negatively impacting the experience of those who’d prefer not to opt-in.
Hardware & Drivers #
AI-specific silicon is moving just as fast as AI software tooling, and without constant work to integrate drivers and userspace tools into Ubuntu, it would be impossible to efficiently utilise this specialised hardware.
Last year we announced that we will be ship both NVIDIA’s CUDA and AMD’s ROCm in the Ubuntu archive for Ubuntu 26.04 LTS, in addition to our previous work on OpenVINO. This will make installing the latest drivers and toolkits easier and more secure, with no third-party software repositories. Distributing this software as part of Ubuntu enables us to be proactive in the delivery of security updates and the demonstration of provenance.
Our work is not limited to AMD and NVIDIA; we recently announced support for Qualcomm’s Dragonwing platforms and others. You can read more about our silicon partner projects on our website.
Inference Snaps #
At the Ubuntu Summit 25.10, we released “Inference Snaps” into the wild. To quote a previous blog post of mine:
Inference snaps provide a hassle-free mechanism for users to obtain the “famous model” they want to work with, but automatically receive a version of that model which is optimised for the silicon in their machine, removing the need to spend hours on HuggingFace trying to identify the correct model to download that matches with their hardware.
There are numerous reasons why you might run a model locally. The industry is moving at record-breaking pace, and the number of models available on Huggingface in their various forms is, at best, overwhelming. Our aim with inference snaps is to make it as simple as possible to get the most efficient form of the most popular open source models, without demanding in-depth knowledge of training, quantisation or GPU features.
Each of our inference snaps provide a consistent experience: you need only learn the basics once, but can apply those skills to different models as they emerge, whether you’re on a laptop or a server.
At the time of writing, we’ve published beta quality snaps for qwen-vl, deepseek-r1 and gemma3. You can find a current list of snaps in the documentation, along with the silicon-optimised variants.
Sandboxing Agents #
While many start their journey in a web browser chatting to ChatGPT, Claude, Gemini, Perplexity or one of the myriad of alternatives, many developers will find “agentic” tools such as Copilot, Codex, Claude Code or Amp quite attractive.
Where a traditional chat-based AI tool responds reactively to user prompts within a single conversation, an agent operates (semi-)autonomously to pursue goals. It perceives its environment, plans, makes decisions and can call out to external tools and services to achieve those goals.
This means that, if you grant permission, an agent can read and understand your code, and implement features, troubleshoot bugs, optimise performance and many other tasks. The catch is that they often need access to your system - whether that be to modify files or run commands.
In my experience, agents are a clear level-up in an LLM’s capability for developers, but they can still make poor decisions. Issues such as accidental file deletion, or the inclusion of a spurious (and potentially compromised) dependency are an inevitable failure mode of the current generation of agents due to how they’re trained (see the Reddit post about Claude Code deleting a user’s home directory).
All of this makes a strong case for sandboxing agents during use, for which we have a few answers…
Sandboxing with LXD #
Canonical’s LXD works out-of-the-box on Ubuntu, and is a great way to sandbox an agent into a disposable environment where the blast radius is limited should the agent make a mistake. My personal workflow is to create an Ubuntu container (or VM) with my project directory mounted. This way, I can edit my code directly on my filesystem with my preferred (already configured) editor, but have the agent run inside the container.
For example:
|
|
You can learn more about LXD in the official documentation and tutorial, as well as specific instructions on enabling GPU data processing in containers/VMs. I’ve written previously about my use of LXD in development.
With LXD, you can choose between running your sandbox as a container or a VM, depending on your project’s needs. If I’m working on a project that requires Kubernetes or similar, I use a VM, but for lighter projects I use system containers, preferring their lower overhead.
Sandboxing with WSL #
If you’re on Windows, development with WSL is a fantastic option and includes support for GPU acceleration, and is even supported for use with the NVIDIA AI Workbench, NVIDIA NIM and CUDA.
Ubuntu is the default Linux distribution for WSL, and you can find more information about how to set up and use Ubuntu on WSL in our documentation. WSL benefits from all the same technologies as a “regular” Ubuntu install, including the ability to use Snaps, Docker and LXD.
For the enterprise developer, we recently announced Ubuntu Pro for WSL, as well as the ability to manage WSL instances using Landscape, making it easier to get access to first-class developer tooling with Ubuntu on your corporate machine.
Sandboxing with Multipass #
Multipass provides on-demand access to Ubuntu VMs from any workstation - whether that workstation is running Linux, macOS or Windows. It is designed to replicate, in a lightweight way, the experience of provisioning a simple Ubuntu VM on a cloud.
Multipass’ scope is more limited than LXD, but for many users it provides a simple on-ramp for development with Ubuntu. Where it lacks advanced features like GPU passthrough, it boasts a simplified CLI and a first-class GUI client.
To get started similarly to the LXD example above, try the following:
|
|
AI Workloads in Production #
Once development and experimentation turns into a product, Ubuntu can serve as the bedrock of production systems in the datacentre or in the cloud.
Canonical Kubernetes is our opinionated Kubernetes distribution. It follows a similar philosophy to the inference snaps in that while the Kubernetes ecosystem is massive, we want to provide the simplest way to get a dependable Kubernetes on Ubuntu:
|
|
From there, you could deploy our Kubeflow distribution, which is a fully-supported MLOps platform that enables you to train, deploy and maintain machine learning models. Or perhaps you’d prefer our MLFlow offering for its experiment tracking and model registry?
Our platform offerings are underpinned by a rich catalog of applications like PostgreSQL, MySQL, Opensearch, as well as other data-centric tools such as Kafka and Spark.
Each of these tools is available as high-quality container images for use in your existing platforms or development workflows, and with the benefit of simplified deployment and operations if deployed in production with Juju. All of our data offerings are available for free under open source licenses, or with the benefit from our Long Term Support (LTS) guarantees through Ubuntu Pro.
Summary #
While opinion remains divided on the value and impact of current AI tooling, its presence in modern development workflows and its demands on underlying compute infrastructure are difficult to ignore.
Developers who wish to experiment need reliable access to modern hardware, predictable tooling, and strong isolation boundaries. Ubuntu’s role is not to dictate how these tools are used, but to provide a stable and dependable platform on which they can be explored and deployed safely, without compromising security, provenance, or the day-to-day experience of those who choose to opt out.