This documentation is for Dash Enterprise.
Dash Enterprise is the fastest way to write & deploy Dash apps and
10% of the Fortune 500 uses Dash Enterprise to productionize AI and
data science apps. Find out if your company is using Dash Enterprise.
This page applies to Dash Enterprise 5. If your organization uses Dash Enterprise 4, view the Workspaces docs at
JupyterDash is a library that makes it easy to build Dash apps from Jupyter environments.
In this chapter, we demonstrate using JupyterDash in Dash Enterprise Workspaces, including:
Install JupyterDash with
$ pip install jupyter-dash
Standard Dash apps use
dash.Dash to create a Dash app instance.
In JupyterDash, you’ll need to replace this with the
Serve your Dash app using
Unlike the standard
Dash.run_server method, the
JupyterDash.run_server method doesn’t block execution of the notebook.
It serves the app in a background thread, making it possible to run other notebook calculations while the app is running.
This means you can update the app without rerunning the potentially expensive data processing steps.
Once you’ve added
run_server to your Dash app, run the notebook by selecting Restart & Run All
<img> in the Notebook Editor toolbar.
run_server runs in external mode, displaying a
URL that you can follow to view the app.
The URL is in the format
Running the app with
run_server() is equivalent to running it with
You can also view your app in a tab within the workspace by running your notebook and selecting Preview.
The app loads in a preview panel:
You can also view the running app directly in a Jupyter Notebook output cell by setting
To deploy your Dash app:
Procfilefiles to your project.
launch.shscript converts your notebook to a
.pyfile to deploy and the
Procfiletells Dash Enterprise which processes to run on startup.
Procfilewithout a file extension.
# Name of notebook to deploy (excluding .ipynb extension)
# Convert notebook to py script
jupyter nbconvert –to script $NAME.ipynb
# Depending on notebook metadata, command above may output a .txt file
# If so, change extension to .py
if [ -f $NAME.txt ]; then
mv $NAME.txt $NAME.py
is the name of your Jupyter notebook, excluding the.ipynb` extension.
web: gunicorn <name>:server --workers 2
<name> is the name of your Jupyter notebook, excluding the
In your notebook, define the
server variable for Gunicorn:
server = app.server
requirements.txt file for your app dependencies with
pip freeze > requirements.txt; then go in
requirements.txt and add
launch.sh script in the workspace terminal:
If you get an error “setuidgid: fatal: unable to run ./launch.sh: access denied”, then make the script executable and run it again:
chmod +x launch.sh
Note: You’ll need to run the
launch.shscript any time you make changes in the Jupyter Notebook
and want to deploy those changes.