This documentation is for Dash Enterprise.
Dash Enterprise is the fastest way to write & deploy Dash apps and
Jupyter notebooks.
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
https://<your-dash-enterprise-server>/Docs/workspaces
.
Workspaces provides a VS Code-like IDE in your browser for developing a Dash app or running Jupyter notebooks.
Workspaces are associated with apps and each app can have one workspace. To add a workspace, first select an app from the App Manager page and go to the Workspace tab.
There are two ways to create a workspace:
Creating a blank workspace
If you haven’t yet deployed this app, select Create blank workspace to get started.
Initialize from a recent commit
If you have deployed this app, you also have the option to build the workspace based on the latest or a previous commit. This is great if you want to run the current (or a previous) version of your deployed app. To do this, choose a Commit and select Create from a commit.
When you create a workspace, Dash Enterprise creates an SSH public key internally. Dash Enterprise uses this key
to authenticate your Git session with the server, allowing you to deploy from your workspace. Note that this key does not appear in your SSH Public Keys list.
View the logs for your new workspace by selecting Show Workspace Logs. Note that it can take a few seconds for the logs to appear.
<img>
Once your new workspace is finished building, select Open Workspace to go to the workspace IDE.
The deveopment site is where you can view the development app (your app running in a workspace).
You can access the development site by selecting Visit Development Site in the Workspace Information section. Don’t forget to run python app.py
in the workspace terminal to start the development app.
In some cases when working with your workspace, you’ll want to restart it. For example, to:
- Have access to environment variables you’ve added since you created the workspace.
- Have access to services (Redis and Postgres) you’ve added since you created the workspace.
- Stop all processes you’ve started in the workspace’s terminal.
- Resolve issues, such as an unresponsive workspace.
To restart a workspace, select the Restart button from the Workspace tab:
<img>
Uncommitted file changes in /home/workspaceuser/app
and packages installed in the workspace terminal are persisted with restarts.
For more details on what restarting a workspace means, see the Restart, Rebuild, and Delete & Recreate Compared section below.
In some cases when working with your workspace, you’ll want to rebuild it. For example, to:
- Remove Python packages you’ve installed in the terminal and do a fresh install based on the requirements.txt
file of your project.
- Reinstall Python based on updates you’ve made to the project.toml
file.
- Run pre-deploy scripts again.
To rebuild a workspace, select Rebuild Workspace from the Workspace tab.
With a rebuild, as Python packages are installed from the requirements.txt
file, packages previously installed with pip
in the workspace terminal are not persisted. Uncommitted file changes in /home/workspaceuser/app
and packages installed in the terminal with sudo apt-get install
and sudo apt install
are persisted with rebuilds.
For more details on what rebuilding a workspace means, see the Restart, Rebuild, and Delete & Recreate Compared section below.
You can stop a workspace to free up CPU and memory:
<img>
If you no longer need your workspace, you can delete it. Deleting removes all files in the workspace. These files are not recoverable.
If you don’t want to lose changes you made to files in the workspace, you can either:
- Deploy those changes to your Dash app (if those changes are ready for production).
- Push those changes to an external Git server like GitHub if your organization has one available.
- Download the files to your local machine.
Behavior | Restart | Rebuild | Delete & Recreate |
---|---|---|---|
Makes environment variables available | ✓ | ✓ | ✓ |
Links services (Redis & Postgres) | ✓ | ✓ | ✓ |
Stops processes started in the terminal | ✓ | ✓ | ✓ |
Preserves Python pip packages installed in the terminal | ✓ | ||
Preserves apt packages installed in the terminal | ✓ | ✓ | |
Installs Python pip packages from requirements.txt |
✓ | ✓ | |
Preserves Python Conda packages | ✓ | ||
Reinstalls apt packages from Aptfile |
✓ | ✓ | ✓ |
Reinstalls Python based on project.toml file |
✓ | ✓ | |
Runs pre-deploy scripts | ✓ | ✓ | |
Preserves saved (uncommitted) files in /home/workspaceuser/app directory |
✓ | ✓ | |
Preserves persistent filesystem | ✓ | ✓ | ✓ |
Notes:
- Apt packages you install in the terminal with sudo apt-get install
or sudo apt install
are automatically added to your Aptfile
, meaning they are available on restart and rebuild.
From the Workspace tab, in the Workspace Resources section, you can set a memory limit.
By default, there is no memory limit for a workspace, meaning it has access to the full memory on the node.
You can set a memory limit in the Workspace Resources section:
For more on memory limits, see Memory Limits.
Workspaces use the same services (Redis and Postgres) as your deployed app. See Using Services With Workspaces for more information on how to structure your apps so your app’s data isn’t overwritten.
Dash Enterprise upgrades may automatically restart your workspaces
to apply changes to the build system or IDE. Refer to the changelog entry for
a specific Dash Enterprise version to see whether upgrading to that version causes
a restart of workspaces and apps.
When git cloning an external project into the workspace, you need to
clone the project into the existing project folder with:
git clone <https:> .
Notice the .
at the end of the git clone statement. You’ll need to delete existing files first. See Cloning Into Workspaces for more.