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 can help you understand the environment that your apps run in when deployed to Dash Enterprise. Some aspects of the environment are configurable.
See also: Environment Variables.
The base operating system for deployed apps is Ubuntu 22. It is not configurable.
Administrators can set a default Python version for all apps on Dash Enterprise. App owners and co-owners can override this version for their apps if needed.
The Python information below applies to pip-based apps. To manage the Python version for Conda-based apps, use environment.yml
. Learn more in Dash App Structure.
The default Python version is 3.10. Administrators can change this default.
To change the default Python version:
admin
role).Note: You cannot select a patch version. The exact Python version that will be set corresponds to the latest supported patch version for the minor version that you select. For example, selecting Python 3.9 means that new apps will default to 3.9.16. Review Supported Python Versions below for support details.
All apps created after this change (as well as any workspaces for those apps) will use the selected Python version by default. The change does not apply to App Studio workspaces nor apps deployed from App Studio.
App owners and co-owners can override the administrator-selected default Python version when it is not appropriate for their apps.
Limitation: The Python version for apps deployed from App Studio cannot be changed.
To override the default Python version for a pip-based app:
Note: You cannot select a patch version. The exact Python version that will be used corresponds to the latest supported patch version for the minor version that you select. For example, selecting Python 3.9 means that your app will use 3.9.16. Review Supported Python Versions below for support details.
Your app is rebuilt and deployed with the new Python version. To apply the change to your app’s workspace, rebuild the workspace.
Apps deployed to Dash Enterprise can use the following Python runtimes:
Dash Enterprise supports the following pip versions:
If your app depends on system-level packages like
database drivers or the Java JRE environment, you can install them using an
Aptfile
or a predeploy script.
For help configuring complex system-level dependencies, please
reach out to our support team.
In the root of your app folder, create a file called
Aptfile
. Here you may specify APT packages to be
installed with one package per line. For example, to install
the ODBC driver, your Aptfile
would look like:
unixodbc
unixodbc-dev
If Dash Enterprise is internet-restricted, you need to specify a custom APT repository that Dash Enterprise has network access to in your Aptfile
. See an example in
Developing Apps when Dash Enterprise Is Internet-Restricted.
When the app is deployed, it’ll install the APT
packages specified in the Aptfile
.
You may include a predeploy script that executes in
your app’s environment. For the case of adding an
ODBC driver, you need to add ODBC initialization files into
the correct systems paths. To do so, include the ODBC
initialization files in the app folder and then use
a predeploy script to copy them into system paths.
First, create a new file. It can
have any name but must correspond to what is called in the project.toml
file that you’ll add in the next step.
For the purposes of this example, we assume you have
named it setup_pyodbc
and placed it in the root of your
app folder.
Your setup_pyodbc
file might look like:
sudo cp /app/odbc.ini /etc/odbc.ini
sudo cp /app/odbcinst.ini /etc/odbcinst.ini
Important:
sudo
is required. See the changelog for more information.
Next, you need to instruct Dash Enterprise to run your setup_pyodbc
file by adding a project.toml
file to the root of your app folder.
Your project.toml
file might look like:
[scripts]
predeploy = "setup_pyodbc"
When the app is deployed, it’ll run the setup file
specified in project.toml
. In this example, the ODBC driver is installed and configured.