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 are initialized as empty or with the deployed Dash app’s code (latest or previous commit).
To clone code from another repository into a workspace:
Open your workspace.
Open a terminal in the workspace and verify that you are in the /home/workspaceuser/app
directory:
$ pwd
/home/workspaceuser/app
Delete all the files in the /home/workspaceuser/app
directory, including the hidden files prefixed with .
:
rm -rf *
rm .gitignore
rm -rf .git
Clone your repository to the /home/workspaceuser/app
directory:
git clone <your-remote-repository> .
Replacing <your-remote-repository>
with the clone URL of your 3rd party repository.
Heads up! Don’t forget the
.
(the period at the end of the command).
This will replace the current directory’s contents with the contents of the cloned repository.
If you omit the.
, then your project will be in a new directory under/home/workspaceuser/app
and the important Application Structure
files likerequirements.txt
will not be detected and used by the workspace when restarted.
Verify that the code was cloned to the correct location:
The current working directory should be /home/workspaceuser/app
:
$ pwd
/home/workspaceuser/app
Your Application Structure files
like Procfile
, requirements.txt
(pip) or environment.yml
(Conda) should
be in this folder and not in a separate nested folder.
For example:
$ ls
app.py
Procfile
requirements.txt
(The contents of your ls
command may be different).
When you rebuild your workspace, Dash Enterprise detects the
Application Structure files
and use these files to install Python, Conda, or system-level (Apt) dependencies
and run pre-deploy scripts.
Re-add the plotly
git
remote.
When the .git
folder was deleted in Step 3, this also deleted the plotly
git remote.
Re-add this remote with:
$ git remote add plotly git@<your-plotly-domain>:<your-dash-app-name>
Replacing <your-plotly-domain>
and <your-dash-app-name>
appropriately. This URL can be found in the App Overview tab.
This adds back the SSH remote. You can add back the HTTPS remote with:
$ git remote add plotly-https <a href="https://<your-dash-enterprise-server>/GIT/<your-dash-app-name>">https://<your-dash-enterprise-server>/GIT/<your-dash-app-name></a>
This URL is also listed on the App Overview tab.
Deploy to the main
branch.
The plotly
remote currently only listens to changes on the main
branch.
If your remote git repository has a different default branch (e.g. master
), then you can deploy to the plotly
remote and main
branch with:
$ git push plotly master:main
Replacing master
with the branch that you are using.
You also have the option to deploy your changes in one click by selecting the Deploy button. See the Deploying Changes chapter for more information on deployment options.