Custom Runtimes
Giving your scripts access to custom packages on Riza
In this guide we’ll create a custom Riza runtime environment with access to
the Markdown Python package which
converts Markdown into HTML. After building this runtime, any Python code
you send to Riza can import markdown
.
Create a custom runtime
-
In the Riza dashboard, go to the Custom Runtimes page.
-
Click + Create runtime.
-
On the Create custom runtime page, pick a name for your runtime.
- For Name, you may only use lowercase letters, numbers, and dashes.
- Click Create custom runtime.
Pick your packages
After creating your runtime, you’ll pick which packages to install.
-
Click Edit from the custom runtime page.
-
List the packages you want to make available to your runtime in the
pip freeze
format.
- To install the Markdown package, use
Markdown==3.6
.
-
Click Update runtime. This creates a runtime revision with status Pending followed by Building while the build completes.
-
If all goes well, the runtime revision status moves to Succeeded.
Use your custom runtime
Now that your custom runtime is built, it’s time to use it. Your runtime identifier is a string that includes your organization name, project name, runtime name and revision ID.
For example, it should look like acme/demos/markdown@02J45CXZVGAB7J517PV2F28NP2
.
Pass that identifier as the runtime parameter to the execute API endpoint.