Custom runtimes work with the self-hosted Riza Code Interperter.

# syntax=docker/dockerfile:1

FROM rizaio/code-interpreter:0.1.12

RUN --mount=type=secret,id=riza-api-key,env=RIZA_API_KEY \
    /riza load-custom-runtime your/custom/runtime@123

You need to provide a valid API key during the build to load the custom runtime.

docker build --secret id=riza-api-key,env=RIZA_API_KEY -t custom-interpreter .

After your image is built, the runtime will be automatically loaded and ready when starting the server.

$ docker run -p3003:3003 -e RIZA_LICENSE_KEY=riza_license_yyy_xxx --rm -it custom-interpreter  
{"timestamp":"2024-10-03T23:11:29.075343Z","level":"INFO","fields":{"message":"successfully validated license key"},"target":"cli"}
{"timestamp":"2024-10-03T23:11:29.075601Z","level":"INFO","fields":{"message":"loaded module","cached":true,"language":"Python"},"target":"warden_lib"}
{"timestamp":"2024-10-03T23:11:29.155638Z","level":"INFO","fields":{"message":"loaded module","cached":true,"language":"JavaScript / TypeScript"},"target":"warden_lib"}
{"timestamp":"2024-10-03T23:11:29.184554Z","level":"INFO","fields":{"message":"loaded custom runtime","cached":true,"filename":"/root/.cache/riza-runtimes/xxx.cwasm"},"target":"cli"}