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

# Share your GPU

> Run jobs for the network in a browser tab, or headless in Docker on a server.

A machine you share takes jobs for the models it has, runs them, and sends the results back. You earn 80% of each job's price for every result it delivers. See [Getting paid](https://docs.sharemy.ai/getting-paid.md).

Jobs are AI jobs only, never crypto mining.

There are two ways to share:

| | Browser | Docker |
| - | - | - |
| Where | A tab on [sharemy.ai/provide](https://sharemy.ai/provide) | A server or rented GPU |
| Signs in with | Your sign-in, or an invite code | An API token |
| GPU | Through WebGPU; small models also run on the processor | NVIDIA, through CUDA |
| Video | Yes | No |

## In the browser

1. Open [sharemy.ai](https://sharemy.ai) and press **Share your GPU**.
2. Sign in, or enter your invite code. Sign in if you want to be paid in USDC.
3. Under **What this machine shares**, choose **Everything it can run** or **One model**. Everything gets the most jobs, because any job this machine can take can come to it.
4. Under **Disk space for models**, choose how much it may download: up to 5, 10, 25 or 50 GB, or **As much as it takes**.
5. Press **Start sharing**.

The first time, the page downloads the safety check (88 MB) and the models that fit. Downloads are kept, so they happen once. Jobs start when the first model is ready.

While you share:

* **Keep the tab open.** It works the graphics card only while a job runs, and it keeps the screen awake.
* **Stop any time** with **Stop sharing**. If you close the tab, its jobs go to other machines.
* **You don't see what you run.** The page never shows you a job's input or who sent it.
* **Pictures are checked first.** Every picture is checked on your machine before it goes back.

A graphics card holds one large model at a time. When a job needs another model, the page swaps it in. The network sends each job to a machine that already has its model loaded when there is one.

### No graphics card found

If the browser cannot reach a graphics card, only small models run, on the processor. In Chrome, turn on **Use graphics acceleration when available** (Settings, System), relaunch Chrome, and reload the page.

## Headless with Docker

The share worker runs without a browser. It signs in with an API token, offers models to the network, and runs jobs on the machine's GPU. It is paid the same way as the share page.

It runs every model in the catalogue except video. Video needs the share page.

### What you need

* An NVIDIA GPU. We suggest a card with 12 GB of memory or more.
* Docker with the NVIDIA Container Toolkit, so `docker run --gpus all` works.
* About 45 GB of disk to offer every model, or less with `SHAREMYAI_MODELS`.
* An [API token](https://docs.sharemy.ai/authentication.md#make-a-token). Earnings go to the token's account.

The image contains CUDA 12.8 with cuDNN 9, Node 22, ffmpeg and the worker.

### Run it

```bash theme={null}
docker run --gpus all \
  -e SHAREMYAI_TOKEN=smai_... \
  -v sharemyai-cache:/cache \
  ghcr.io/catswithkeyboards/sharemyai-share:latest
```

> [!NOTE]
>
> If pulling the image is denied, it is not public yet. Ask on [Discord](https://discord.gg/qGhXEagn8K).

Keep `/cache` on a persistent volume. Without it, every restart downloads the weights again.

At start, the worker downloads and test-loads every model it plans to offer. As many as fit in its memory budget stay loaded and start jobs at once. The others load when a job asks for one, and the model used longest ago is unloaded to make room.

The worker only makes an outgoing WebSocket connection. It needs no open ports and no health check.

### Options

Set options as environment variables, or as flags after the image name.

| Variable | Flag | Meaning | Default in the image |
| - | - | - | - |
| `SHAREMYAI_TOKEN` | `--token` | API token. Earnings go to its account. | none |
| `SHAREMYAI_MODELS` | `--models` | Model ids to offer, comma-separated | every model the worker runs |
| `SHAREMYAI_DEVICE` | `--device` | `cuda` or `cpu` (`dml` is for Windows, outside Docker) | `cuda` |
| `SHAREMYAI_MEMORY_GB` | `--memory` | GB of models kept loaded | 85% of the GPU's memory, or half the RAM on CPU |
| `SHAREMYAI_CACHE` | `--cache` | Where weights are kept | `/cache` |
| `SHAREMYAI_URL` | `--url` | The network to join | `wss://sharemy.ai/api/network` |

Two flags do something other than share:

| Flag | What it does |
| - | - |
| `--list` | Print the models this machine can offer, and exit |
| `--download` | Download the weights of every planned model, and exit |

For example, to offer three models:

```bash theme={null}
docker run --gpus all \
  -e SHAREMYAI_TOKEN=smai_... \
  -e SHAREMYAI_MODELS=qwen3-4b,whisper-base,z-image-turbo \
  -v sharemyai-cache:/cache \
  ghcr.io/catswithkeyboards/sharemyai-share:latest
```

Model ids are the ones on the [Models](https://docs.sharemy.ai/models.md) page and in `--list`.

### On a rented GPU

The image runs on any GPU host that can start a Docker image with a GPU attached. Set `SHAREMYAI_TOKEN` in the host's environment settings, and keep the image's own entrypoint.

* Rent an on-demand machine where you can. A host that can take an interruptible machine back stops your worker until it returns. Any job it was running moves to another machine. You are paid only for results your machine delivers.
* If the host keeps no disk between restarts, each start downloads the models again. Offer fewer models with `SHAREMYAI_MODELS` to start faster.


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