Cloud

Cloud

Installing App APT Dependencies

Your app can use Python packages that need a system package. For example, a video library can need ffmpeg. On your own computer, you install this package with APT:

sudo apt install ffmpeg

On Frappe Cloud, you cannot run this command. Instead, list the APT packages in the pyproject.toml file of your custom app:

[tool.frappe-cloud]
apt-dependencies = [
    "ffmpeg",
]

When Frappe Cloud builds your bench, it installs each package in this list into the image.

How Frappe Cloud reads the list

  • Frappe Cloud reads the list of each app on the bench and installs all packages from all lists.
  • Frappe Cloud installs each package one time, also when many apps list it.
  • Each package name must be a valid package for the Ubuntu version of the image. If APT cannot find a package, the build fails.

Old format

Before, this page told you to use this table:

[deploy.dependencies.apt]
packages = [
    "ffmpeg",
]

Frappe Cloud still reads this table. But [deploy] is not a valid table in pyproject.toml. PEP 518 reserves all top-level tables for Python standards. Tools can use only tables under [tool]. Some tools that read pyproject.toml can show a warning or an error for [deploy].

To move to the new format:

  1. Copy the package names from [deploy.dependencies.apt] packages.
  2. Add them to [tool.frappe-cloud] apt-dependencies.
  3. Remove the [deploy.dependencies.apt] table.

If your app has both tables, Frappe Cloud reads both.

Last updated 1 week ago
Was this helpful?
Thanks!