Configuring System Dependencies

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.

In some cases you may need to install and configure system
dependencies. Examples include installing and configuring
database drivers or the Java JRE environment.
Dash Enterprise supports these actions through an
Aptfile and a predeploy script.

If you need help configuring complex system-level dependencies, please
reach out to our support team.

Installing APT Packages

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:


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 will install the APT
packages specified in the Aptfile.

Configuring System Dependencies

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
copy them into system paths in the predeploy script.

Adding a Predeploy Script

Let’s generate a file to do this. This file 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 installed it in the root of your
app folder.

Important: sudo is required. See the changelog for more information.

sudo cp /app/odbc.ini /etc/odbc.ini
sudo cp /app/odbcinst.ini /etc/odbcinst.ini

Running a Predeploy Script Using project.toml

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.

predeploy = "setup_pyodbc"

Now when the app is deployed, it will run the setup file
specified in project.toml. In this example, the ODBC driver is installed and configured.