ollama image running on a GPU in a few minutes. Get started by adapting the following fly.toml file:
fly.ollama.toml.
Then you can launch the app:
- The
ollamaimage is a GPU image, so you need to specify a GPU size in the[[vm]]section. - Not all regions have GPUs available, refer to region GPU availability for more info
- The
[[mounts]]section is used to mount a volume to store the models. This is a good practice to keep the models separate from the app code. - The volume size in this config file is 10gb, that’s enough for small models. Change this value if you need more.
- The
--flycastflag creates a private IPv6 address for the app.
ollama server; at this point you cannot interact with any models yet.
To do so, you will have to pull in a model with this one easy, short, intuitive command:
llama3.1 model. You can change the model name to suit your needs.
At this point this model is now available to the internal network of the organization it is deployed in.
You can access it using Flycast from this URL: http://<your-app>.flycast.
Now that we have a functioning ollama with a model, we have to expose the ollama host to our app. One way to do this is to set the host as a secret:
ollama package: