Follow

Installing Custom Packages on Domino with Git Integration

Domino allows users to to install internally developed custom R and Python packages stored in GitHub or GitHub Enterprise. For best performance, this should often be done by creating a custom environment. However, if the user does not want to create a custom environment or is running a quick test or prototype, it is possible to install these packages inside of a Domino project.

Configuring Git Integration

Users should begin by configuring git integration in their desired Domino projects.

Note: if you do not see a Repositories section on the Files page, then this feature is not enabled for you. Please speak with your system administrator or contact us at support@dominodatalab.com to enable Git repository integration. 

Installing a Custom Python Package

If it doesn't already exist, create a file named requirements.txt in the root directory of your project. Add the following line to requirements.txt:

-e /repos/<repo_name>

For example, if a user wanted to install scikit-learn from a git repository, his or her requirements.txt should look like: 

Screen_Shot_2017-04-22_at_7.24.30_AM.png

Once this requirements.txt is in place, Domino will automatically install the Python package every time a notebook or batch run starts within the project.

Installing a Custom R Package

If it doesn't already exist, create a file named install.R; in the root directory of your project. Add the following line to install.R:

devtools::install_local('/repos/<repo_name>')

For example, if a user wanted to install ggplot2 from a git repository, his or her install.R should look like:

Screen_Shot_2017-03-30_at_1.30.32_PM.png

Once this install.R is in place, users should put a line:

source('install.R')

at the beginning of their work within the project to install the project for their sessions

Was this article helpful?
0 out of 0 found this helpful

Comments