[GH-ISSUE #997] Run Ollama on AWS #483

Closed
opened 2026-04-12 10:09:50 -05:00 by GiteaMirror · 3 comments
Owner

Originally created by @telestia on GitHub (Nov 4, 2023).
Original GitHub issue: https://github.com/ollama/ollama/issues/997

I created an AMI on which I run Ollama and made sure that it works fine, but when I create another machine from this AMI, although the OLLAMA services are active, an ollama process does not appear in the nvdia-smi command, and when I try to run my model with the ollama run command, only the loading bar returns. . I have no idea what might cause this problem, I would appreciate it if you could help me.

Originally created by @telestia on GitHub (Nov 4, 2023). Original GitHub issue: https://github.com/ollama/ollama/issues/997 I created an AMI on which I run Ollama and made sure that it works fine, but when I create another machine from this AMI, although the OLLAMA services are active, an ollama process does not appear in the nvdia-smi command, and when I try to run my model with the ollama run command, only the loading bar returns. . I have no idea what might cause this problem, I would appreciate it if you could help me.
Author
Owner

@igorschlum commented on GitHub (Nov 6, 2023):

Hello telestia,

An AMI, or Amazon Machine Image, is a template that contains a software configuration for launching an instance on AWS. An instance is a virtual server in the cloud that runs the software in the AMI. You can launch multiple instances from the same AMI, or different types of instances depending on your needs. For example, you can launch an instance with an AMI that has an operating system, an application server, and applications pre-installed, or you can launch an instance with an AMI that has only an operating system and then install the software you want on it. You can also create your own custom AMIs, or use AMIs provided by AWS or the community. For more information, see Amazon Machine Images https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/AMIs.html or Instances and https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instances-and-amis.html

Your AMI is with the linux version of Ollama? Do you use the Docker version of Ollama? Did you try again with version 0.1.8 ?

<!-- gh-comment-id:1793893270 --> @igorschlum commented on GitHub (Nov 6, 2023): Hello telestia, An AMI, or Amazon Machine Image, is a template that contains a software configuration for launching an instance on AWS. An instance is a virtual server in the cloud that runs the software in the AMI. You can launch multiple instances from the same AMI, or different types of instances depending on your needs. For example, you can launch an instance with an AMI that has an operating system, an application server, and applications pre-installed, or you can launch an instance with an AMI that has only an operating system and then install the software you want on it. You can also create your own custom AMIs, or use AMIs provided by AWS or the community. For more information, see Amazon Machine Images https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/AMIs.html or Instances and https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instances-and-amis.html Your AMI is with the linux version of Ollama? Do you use the Docker version of Ollama? Did you try again with version 0.1.8 ?
Author
Owner

@telestia commented on GitHub (Nov 6, 2023):

I am using linux version of ollama on ubuntu 22.04. I have come a little further in solving the problem. After creating my ec2 instance and waiting for about 10 minutes, I realized that I could run it. I thought this might be related to disk speed, so I'll try creating my AMI again with a faster disk.

<!-- gh-comment-id:1794254687 --> @telestia commented on GitHub (Nov 6, 2023): I am using linux version of ollama on ubuntu 22.04. I have come a little further in solving the problem. After creating my ec2 instance and waiting for about 10 minutes, I realized that I could run it. I thought this might be related to disk speed, so I'll try creating my AMI again with a faster disk.
Author
Owner

@johnzhao9 commented on GitHub (Aug 1, 2024):

thanks for the lead telestia, it's definitely related to disk

for future readers, faster disks are kind of expensive however, running fio through ollama's blob where the models are stored worked with the same slow disk

on ubuntu, try this.

sudo apt update
sudo apt-get install -y fio
for file in /usr/share/ollama/.ollama/models/blobs/*; do fio --name=readfile --filename="$file" --rw=read --bs=1M --iodepth=32 --ioengine=libaio --direct=1 --status-interval=5; done

this exact issue and fio work around comes from this AWS source: Addressing I/O latency when restoring Amazon EBS volumes from EBS Snapshots
by Vishal Gupta | on 18 APR 2022

<!-- gh-comment-id:2263706469 --> @johnzhao9 commented on GitHub (Aug 1, 2024): thanks for the lead telestia, it's definitely related to disk for future readers, faster disks are kind of expensive however, running fio through ollama's blob where the models are stored worked with the same slow disk on ubuntu, try this. ``` sudo apt update sudo apt-get install -y fio for file in /usr/share/ollama/.ollama/models/blobs/*; do fio --name=readfile --filename="$file" --rw=read --bs=1M --iodepth=32 --ioengine=libaio --direct=1 --status-interval=5; done ``` this exact issue and fio work around comes from this AWS source: [Addressing I/O latency when restoring Amazon EBS volumes from EBS Snapshots by Vishal Gupta | on 18 APR 2022](https://aws.amazon.com/blogs/storage/addressing-i-o-latency-when-restoring-amazon-ebs-volumes-from-ebs-snapshots/)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#483