> ## Documentation Index
> Fetch the complete documentation index at: https://docs.outerproduct.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Image

> A registry base and ordered layers, prepared on first use.

```python theme={null}
class Image
```

`base` supplies the container image and its Python interpreter.

`add_local_dir` and `add_local_file` mount files over the image when
each container starts instead of building them into it, so editing them
rebuilds nothing. Later mounts win where paths overlap.

```python theme={null}
Image(
    base: str,
    layers: tuple[tuple[str, ...], ...] = (),
    mounts: tuple[LocalMount, ...] = (),
)
```

```python theme={null}
base: str
layers: tuple[tuple[str, ...], ...]
mounts: tuple[LocalMount, ...]
```

## `from_registry`

<sub>method</sub>

```python theme={null}
def from_registry(uri: str) -> Self
```

## `with_uv_pip_install`

<sub>method</sub>

```python theme={null}
def with_uv_pip_install(*packages: str = ()) -> Self
```

## `add_local_dir`

<sub>method</sub>

```python theme={null}
def add_local_dir(local_path: str | os.PathLike[str], remote_path: str) -> Self
```

Mount a local directory's files under the absolute `remote_path`.

A Run uploads them only when the service lacks this exact tree.

## `add_local_file`

<sub>method</sub>

```python theme={null}
def add_local_file(local_path: str | os.PathLike[str], remote_path: str) -> Self
```

Mount one local file at the absolute `remote_path`.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.