> For the complete documentation index, see [llms.txt](https://docs.eyepop.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.eyepop.ai/deploying/on-premise/getting-started.md). Agents can also search and read this documentation through its [MCP server](https://docs.eyepop.ai/~gitbook/mcp).

# Your First Instance

Set up an instance, run inference on it, and switch its model

This walk-through sets up an instance on a Linux machine, runs inference on it, and switches it to another model. It takes a few minutes, most of them spent downloading the runtime image. You only need the CLI.

### 1. Check what you need

* A Linux machine with **Docker** and the **Docker Compose v2** plugin. `docker compose version` should print a version. On Windows, use Ubuntu under WSL2, set up as in [Install And Sign In](https://docs.eyepop.ai/cli/getting-started.md), with Docker installed in Ubuntu or Docker Desktop's WSL integration turned on for it.
* The **EyePop CLI** on that machine. See [Install And Sign In](https://docs.eyepop.ai/cli/getting-started.md) to install it.
* An **API key**, created in the EyePop dashboard. Export it for this shell:

  ```bash
  export EYEPOP_API_KEY=eyp_...
  ```
* Port **8080** free on the machine: the instance always listens there.
* A few gigabytes of free disk space for the runtime image and models.

{% hint style="info" %}
**Windows only.** On Windows with Docker Desktop, `init` can stop at the registry login with `error storing credentials`, followed by `A specified logon session does not exist`. Docker Desktop keeps logins in the Windows Credential Manager, which a remote desktop or cloud VM session may not have. Give EyePop a Docker config of its own, without a credential store, and run `init` again in the same shell:

```bash
mkdir -p ~/.docker-eyepop && echo '{}' > ~/.docker-eyepop/config.json && chmod 600 ~/.docker-eyepop/config.json
export DOCKER_CONFIG=~/.docker-eyepop
```

Docker then keeps the registry login in that file. Keep `DOCKER_CONFIG` exported for later `eyepop instance` commands, for example in `~/.bashrc`.
{% endhint %}

### 2. Look at the machine

```bash
eyepop system
```

`system` changes nothing. It reports what the CLI found:

* **Docker**: the client, the daemon, and Compose. Each should be present and reachable.
* **Runtime**: the accelerator it detected and the **profile** it picks for it, for example `cuda` on a machine with an NVIDIA GPU, or `cpu` when there is none. The profile decides which runtime image the instance uses; see [Platforms](https://docs.eyepop.ai/deploying/on-premise/platforms.md).
* **Devices**: when the machine has more than one GPU or NPU the instance could run on, each with an id you can pass to `--device`.
* **Credentials**: whether the API key is set.

If a profile needs something the machine lacks, fix it now; the profile's section in [Platforms](https://docs.eyepop.ai/deploying/on-premise/platforms.md) says what.

### 3. Create the instance

```bash
eyepop instance init --ability eyepop.person:latest
```

This serves `eyepop.person:latest`, a model that finds people in images. `init` asks you to confirm the API key, then:

1. **Checks the machine**: Docker, Compose, the API key, and what the profile needs. If anything is missing it lists every problem with its fix, and changes nothing.
2. **Checks your API key and account with EyePop**, and picks the runtime version EyePop recommends.
3. **Logs Docker in to the EyePop registry**, unless it already is.
4. **Writes the instance's files** into `~/.eyepop`.
5. **Downloads the runtime image.** This is several gigabytes and is the slow part; it shows no progress unless you set `EYEPOP_LOG_LEVEL=debug`.
6. **Starts the instance and waits until it is healthy**, printing what the runtime is doing, such as downloading a model.

When it is done:

```
✓ Instance ready at ~/.eyepop. It registered with EyePop as it started; `eyepop get instances` lists it.

Try it:
  eyepop run --media-path <image.jpg>

Or reach it directly:
  curl -s http://127.0.0.1:8080/health
```

If the instance does not become healthy, `init` shows the runtime's last log lines and removes what it set up, so you can fix the cause and run it again.

### 4. Run inference

Take any photo with people in it:

```bash
eyepop run --media-path photo.jpg
```

With no target named, `run` uses the pop the instance serves. It prints the file name and what the model found, as JSON. Each person is one entry under `objects`, with how confident the model is and where the person is in the image, in pixels:

```json
{
  "objects": [
    {
      "classLabel": "person",
      "confidence": 0.9873,
      "x": 274.963,
      "y": 66.821,
      "width": 221.069,
      "height": 631.298
    }
  ],
  "source_width": 500,
  "source_height": 700
}
```

That excerpt is shortened; the full result has a few more fields. With `--json`, `run` prints one JSON line per image, for scripts.

The image went to the instance on this machine. Nothing was sent to EyePop's cloud and no cloud session was started; `eyepop get sessions` shows nothing new.

### 5. Serve a different model

```bash
eyepop instance set --ability eyepop.vehicle:latest
eyepop run --media-path street.jpg
```

`instance set` checks the new ability with EyePop, restarts the instance with it, and waits until it is healthy again. The instance is unavailable for those seconds. The runtime is not downloaded again, and the models it already downloaded stay on the machine.

### 6. Stop or remove it

```bash
eyepop instance stop      # stops it; start it again with `eyepop instance start`
eyepop instance delete    # removes it from this machine
```

`delete` lists what it will remove and asks first.

From here, [Settings](https://docs.eyepop.ai/deploying/on-premise/settings.md) explains every option `init` and `set` take, [Optimize Models](https://docs.eyepop.ai/deploying/on-premise/optimize.md) how to get more speed out of the accelerator, [Media Cache](https://docs.eyepop.ai/deploying/on-premise/media-cache.md) how to record video and read frames and clips back, and [Call It From Your Application](https://docs.eyepop.ai/deploying/on-premise/applications.md) how your own code sends it media.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.eyepop.ai/deploying/on-premise/getting-started.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
