Create custom applications¶
Premium
Custom application upload from a pre-built image is a premium feature. Contact your DataRobot representative or administrator for information on enabling the feature.
Create custom applications in DataRobot to share machine learning projects using web applications including Streamlit, Dash, and Plotly, from an image created in Docker. Once you create a custom machine learning app in Docker, you can upload it as a custom application in the DataRobot apps workshop and deploy it with secure data access and controls. Alternatively, you can use the DRApps command line tool to create your app code and push it to DataRobot, building the image automatically.
Paused custom applications
Custom applications are paused after a period of inactivity. The first time you access a paused custom application, a loading screen appears while it restarts.
Upload a custom application¶
To upload a custom application to DataRobot, first, you must create an app image in Docker:
-
Install Docker.
-
Create an app (see examples for Streamlit, Flask, and Aiohttp).
-
Expose
port8080
in your Dockerfile for HTTP requests. -
Build your image with
docker build [PATH] | [URL] --tag [IMAGE NAME]
. -
Test your app image locally with
docker run --publish 8080:8080 [IMAGE NAME]
.
When you are ready to upload your app image to DataRobot, create a new build and then export it with docker save [IMAGE NAME] --output [PATH]
. Once you have your app (exported as a tar
, gz
, or tgz
archive) upload the image to the Applications tab.
Once you have a custom application tar
, gz
, or tgz
archive, you can upload the image to the Applications page in the DataRobot Registry:
-
In the Registry, navigate to the Applications page and click the dropdown next to Add new application source. Then select Upload application.
-
In the Create new custom application panel, configure the following:
-
In the Name field, enter a descriptive name for your custom app.
-
In the Add application image group box, click Choose file, select the
tar
,gz
, ortgz
archive containing the image, and then click Open.The custom application image begins to upload.
-
-
Once the application is uploaded, click Create application.
The custom application is added to the All applications list with a status of Initializing. After it builds, you can click Open to view the application.
Note
You can click the Actions menu next to a custom application in the Applications tab to Share or Delete the application.
Build a custom application from an application source¶
Note
The storage component of custom apps is not persistent. You can only write to the /tmp
directory, and the directory's contents won't be persisted across sessions.
If you have configured an application source, you can use it to build a custom app:
-
In the Registry, click the Applications > Application sources tab, and then select the application source from which you want to build a custom app.
-
Click Build application. Allow time for DataRobot to initialize the app.
-
The custom app is added to the list of apps built from that source. After it builds, you can click Open to view the application.
Note
You can click the Actions menu next to a custom application in the Applications tab to Share or Delete the application.
Build a custom application from the template gallery¶
DataRobot provides application templates from which you can build custom applications. Application templates are comprehensive, end-to-end recipes designed to accelerate the development and operation of generative and predictive AI use cases. These templates contain all necessary assets with customizable components, allowing teams to quickly implement tailored AI solutions.
-
In the Registry, click the Applications page, and then click Add new application source > Create new application from template gallery in the top-right corner of the page.
-
Browse the application template gallery to review the use cases that each template supports. The table below summarizes the templates available.
Application template Description Flask app base template A code template used to build a Flask application, a flexible web framework for Python. Flask allows you to map URLs to specific Python functions, which define the behavior of the app. Q&A Chat Generation app template A code template used to build a Q&A application powered by Streamlit and supported by the styling library streamlit-sal
.Slack Bot app template A code tempalte used to create a Slack application to configure Slack bot messages and events. Streamlit app base template A code template used to build a Streamlit application. Streamlit is an open-source Python framework designed for quickly building and deploying data-driven applications. -
Click on a template to expand and review the supporting documentation, including more information about the use case.
-
Select a template and click Create application source in the top-right corner.
-
DataRobot brings you to the application source page, populated with the template's contents. Review any application dependencies and the application source's files, then click Build application. Allow time for DataRobot to initialize the app.
-
The custom application is added to the list of apps built from that source. After it builds, click Open to view the application.