Install Ollama with OpenAI gpt-oss-20b on Ubuntu within an EC2 instance
19 août 2025 à 18:33
In my previous post, I explained why you might want to run OpenAI gpt-oss-20b or gpt-oss-120b on your own virtual machine and how to select an appropriate EC2 instance type. Today, I will show you how to install Ollama via script or snap on Ubuntu within an EC2 instance. Most steps can be adapted for other cloud providers, on-premises setups, or Linux distributions with minor modifications. I will also briefly discuss the benefits of running open-weight models on an EC2 instance with Ollama compared to Bedrock, SageMaker, vLLM, or Hugging Face Transformers.