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.
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 development 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 and Recreate |
---|---|---|---|
Makes environment variables available | ✓ | ✓ | ✓ |
Links services (Redis and Postgres) | ✓ | ✓ | ✓ |
Stops processes started in the terminal | ✓ | ✓ | ✓ |
Preserves Python pip packages installed in the terminal | ✓ | ||
Preserves APT packages installed in the terminal | ✓ (1) | ✓ (1) | |
Installs Python pip packages from requirements.txt |
✓ | ✓ | |
Preserves Python Conda packages | ✓ | ||
Reinstalls APT packages from Aptfile |
✓ (1) | ✓ (1) | ✓ |
Reinstalls Python based on project.toml file |
✓ | ✓ | |
Runs pre-deploy scripts | ✓ | ✓ | |
Preserves saved (uncommitted) files in /home/workspaceuser/app directory |
✓ | ✓ | |
Preserves persistent filesystem | ✓ | ✓ | ✓ |
(1) APT packages that you install in the terminal with sudo apt-get install
or sudo apt install
are automatically added to your Aptfile
, meaning they are available when you restart or rebuild the workspace. Known issue: If you are specifying an additional repository (in the terminal or Aptfile
) to install APT packages from, those packages are not preserved on restart or rebuild, so you’ll need to reinstall them.
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.