By default, Domino runs each of your scripts (or interactive sessions) from a fresh environment.
This means that packages are installed in your environment every time you start an execution. To specify additional dependencies, you can add a pip requirements file named
requirements.txt to the root of your project folder.
Domino provides flexibility, so if you want your changes to remain permanently installed, see Preload Environment packages to create a custom environment.
Many common modules are installed by default.
To get a list of pre-installed modules, include
help('modules') at the start of your script or in a new IPython Notebook session.
You can also run
domino run --direct "pip freeze" with the Domino CLI tool.
The requirements file specifies which libraries and any version requirements for them. Follow the proper syntax for the pip install requirements file. For example:
pandas lxml==3.2.3 numpy>=1.7.1
If you’re working in a Jupyter Notebook, you can also use
pip to install dependencies interactively.
In a notebook cell, you can run:
! pip install --user <package>
(The '!' tells the notebook to execute the cell as a shell command.)
If you’re using pip on your local machine, the easiest way to generate the
requirements.txt file is to run the following command in the root of
your project folder (or in the Artifacts folder if your project is Git-based):
~/domino/myProject $ pip freeze > requirements.txt
For performance reasons, prune the file so that it includes only the libraries needed for your analysis.
Pip can install Python packages from source by cloning a public Git repository over HTTPs.
See pip install for reference.
To specify this, you must add something like the following line to your
The most common host of Git projects is GitHub. If the package you want to install is publicly accessible, then the previous instructions will work. However, if you must install private repositories, Domino can securely integrate with GitHub to access those private repositories. See Import Git Repositories for information about securely storing your Github credentials.