Set up a custom repository location

You can set up a custom default location for Python and R code package repositories. This is especially useful for air-gapped clusters that are isolated from the PIP and CRAN repositories on the public internet.

Python PIP repository

Custom PIP repositories can be set as default for all engines at a site or project level. The environmental variables can be set at the Project or Site level. If the values are set at the Site level, they can be overridden at the Project level.

  1. Set the environmental variables at the appropriate level.
    • For Site level, go to: Site Administration > Engine
    • For Project level, go to: Project Settings > Engine
  2. To set a new default URL for the PIP index, enter:
    • PIP_INDEX_URL = <new url>
    • PIP_EXTRA_INDEX_URL = <new url>

CRAN repository

Custom CRAN repositories must be set in a session or as part of a custom engine. To set a new default URL for a CRAN repository, set the following in the /home/cdsw/.Rprofile file:

options(repos=structure(c(CRAN="<mirror URL>")))