Skip to main content
If you have your own GPU, you can test your model in Docker before deploying. This is optional but useful for catching issues early without waiting for a deploy cycle.
Local testing requires an NVIDIA GPU and Docker with GPU support. If you don’t have your own GPU, you can skip this step and deploy directly to Reactor.

Run your model locally

Build and run your Docker image with GPU access and your weights mounted:
docker build -t my-model:dev .
docker run --gpus all -v ./weights:/weights -p 8080:8080 my-model:dev
The container should start and log that the model is loaded and ready.

Connect with the SDK

The Reactor SDK has a local mode that connects directly to your running container, bypassing the production coordinator. No API key or authentication needed.
import { ReactorProvider, ReactorView } from "@reactor-team/js-sdk";

export default function App() {
  return (
    <ReactorProvider
      modelName="my-model"
      local={true}
      autoConnect={true}
    >
      <ReactorView className="w-full aspect-video" />
    </ReactorProvider>
  );
}
Local mode defaults to http://localhost:8080. To use a different port, pass apiUrl:
const reactor = new Reactor({
  modelName: "my-model",
  local: true,
  apiUrl: "http://localhost:9090",
});

What to check

  • Model loads - No tracebacks in the container logs after load() runs.
  • Video streams - The SDK receives frames and renders video.
  • State changes work - Send a command (e.g., change the prompt) and verify the output changes.