Update: The following is the general method to schedule apps, and applies to e.g. Shiny apps as well (not restricted to Dash apps).
This is possible by adding the following files app.py and requirements.txt to your project.This is possible using a function in Domino's Python API call app_publish().
There is a written a script which takes advantage of this. To do so, simply:
Additionally, if you'd like the app to shut down regularly, you can schedule a job using the command "app.py off"
Here are the two files you will need.
from domino import Domino
action = sys.argv
domino = Domino(os.environ['DOMINO_PROJECT_OWNER'] + "/" + os.environ['DOMINO_PROJECT_NAME'],
if action == "on":
elif action == "off":
raise ValueError('This script uses the format: app.py [on]/[off]')
Note: You can also add the installation to your Compute Environment Dockerfile Instructions instead of a requirements.txt file.
Update: On older versions of Domino (e.g. 2.x, 3.x), you may see an error when using the latest version the python-domino package. If this occurs, you can install the 0.3.5 version of the python-domino package as follows:
pip install https://github.com/dominodatalab/python-domino/archive/0.3.5.zip
Important to note that this works for all R/Shiny apps as well as Dash apps. The app.sh file in your projects determines what app gets published. This script, written in python, just calls an API to publish your app, so it is agnostic to the type of app you are publishing.
Field Data Scientist @ Domino
It looks like you're new here. If you want to get involved, click one of these buttons!