Learn how to deploy the Riza Code Interpreter in your environment
For most customers, our hosted Code Interpreter API offers the
best solution to safely execute untrusted Python,
JavaScript, Ruby or
PHP in an isolated and secure environment, powered by
WebAssembly.However, you may want to deploy the Code Interpreter API into your network for
security, compliance, or performance reasons.Unlike other code interpreter solutions, the Riza Code Interpreter is easy to
deploy. It’s distributed as a stateless, horizontally scalable service using a
single Docker image, with easy-to-meet system requirements.
The rizaio/code-interpreter image supports Linux AMD64 and ARM64/v8.
Copy
Ask AI
$ docker pull rizaio/code-interpreter
Running the service requires a license key.
Copy
Ask AI
$ docker run --rm -p3003:3003 -it rizaio/code-interpreter-----> Validating license key... ERROR: The 'RIZA_LICENSE_KEY' environment variable is not set
The self-hosted Code Interpreter API is a drop-in replacement for our hosted
API.Our client libraries support self-hosted instances
by setting the base URL of the client. When running locally, this will default
to http://localhost:3003.
Copy
Ask AI
import Riza from '@riza-io/api';const riza = new Riza({ baseURL: "http://localhost:3003", apiKey: "riza_self_hosted",});async function main() { const resp = await riza.command.exec({ language: "python" code: "print('Hello, self-hosting!')", }); console.log(resp);}main();