If you’d rather run Moondream yourself than use their cloud offering, there are many ways to do so depending on your needs:

  1. 💻 Run locally on the same machine where you’re running Magnitude tests
    • Great for local development on high-end machines
  2. 🔒 Self-host on your own infrastucture or VPC
    • When compliance and security are essential
  3. Self-host with GPUs on a cloud platform like Modal
    • Perfect for quickly booting up a fast Moondream server

Select the appropriate option below for more instructions!


Running Moondream locally

To run Moondream on your local machine, first go to https://moondream.ai/c/moondream-server and download the appropriate server (currently Moondream only provides macOS/Linux executables).

Follow the instructions on that page to run the executable.

Then you can configure magnitude.config.ts with the local base URL:

import { type MagnitudeConfig } from 'magnitude-test';

export default {
    url: "http://localhost:5173",
    executor: {
        provider: 'moondream',
        options: {
            baseUrl: 'http://localhost:2020/v1'
        }
    }
} satisfies MagnitudeConfig;

That’s it! Now you can run tests with local Moondream.

Local inference is very slow on CPU, newer macOS machines or a GPU is recommended for this, otherwise you may want to deploy on modal instead