dstack application may contain its own packages and modules as well have dependencies to third-party libraries.
In order to push such an application, one must provide the information on these packages, modules, and libraries within the call of the
Here's an example:
import dstack as dsfrom handlers import fake_handlerapp = ds.app(fake_handler, depends=["handlers", "utils"], requirements="requirements.txt")url = ds.push("deps_app", app)print(url)
As you see, we use
requirements arguments to specify what modules, packages, and libraries our application depends on. In this case, the application depends on the module `handlers`, the package
utils, and on all libraries specified in the
depends argument may list either local modules and packages or PiPy packages. An alternative equivalent of the line above would be the following:
app = ds.app(fake_handler, depends=["numpy", "pandas", "faker==5.5.0", "handlers", "utils"])
When you run the application the first time,
dstack makes sure all dependencies are installed.