domino logo
4.3
  • Tech Ecosystem
  • Deployment-wide Search
  • Get Started
  • Security and Credentials
  • Collaborate
  • Organizations
  • Projects
  • Domino Datasets
  • External Data
  • Workspaces
  • Environments
  • Executions
  • Model APIs
  • Publish
  • Notifications
  • Domino Command Line Interface (CLI)
  • Troubleshooting
  • Get Help
domino logo
About Domino
Domino Data LabKnowledge BaseData Science BlogTraining
User Guide
>
Environments
>
Customize Environments
>
Install Custom Packages with Git Integration

Install Custom Packages with Git Integration

Domino allows you to install internally developed custom R and Python packages stored in GitHub or GitHub Enterprise. For best performance, do this by creating a custom environment. However, if you do not want to create a custom environment or you are running a quick test or prototype, you can install these packages in a Domino project.

Configure Git integration

Start by configuring git integration in your Domino projects.

Install a custom Python package

  1. If it doesn’t already exist, create a file named requirements.txt in the root directory of your project.

  2. Add the following line to requirements.txt:

    -e /repos/<repo_name>
    -e /repos/<repo_name>

After requirements.txt is in place, Domino automatically installs the Python package every time you start a workspace or batch run within the project.

Install 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 you want to install ggplot2 from a Git repository, your install.R should look like:

screen shot 2017 03 30 at 1.30.32 PM

After this `install.R is in place, enter a line at the beginning of your work within the project to install the project for your sessions.

source('install.R')
Domino Data LabKnowledge BaseData Science BlogTraining
Copyright © 2022 Domino Data Lab. All rights reserved.