domino logo
4.2
  • 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
>
Security and Credentials
>
Create a Mirror of Compute Environments

Create a Mirror of Compute Environments

Many customers maintain internal mirrors of public package repos. This is typically done while they use a whitelist to remove access to external, public repositories. This might be for security or for standardization.

You can add the following to the Dockerfile instructions in your global compute environments to set Conda, pip, or Rstudio to reference your internal mirrors by default:

RUN \
   # Add $CUSTOMER mirrors to condarc config files. Also disabled auto_update since mirrors are not always up to date.
   printf "\nchannels:\n  - $CUSTOMER_CHANNEL_1\n  - $CUSTOMER_CHANNEL_1\n\n" >> /opt/conda/.condarc && \
   printf "\nallow_other_channels: False\n" >> /opt/conda/.condarc && \
   printf "\nssl_verify: False \n" >> /opt/conda/.condarc && \
   printf "\nshow_channel_urls: True\n" >> /opt/conda/.condarc && \
   printf "\nauto_update_conda: False\n" >> /opt/conda/.condarc && \
   \
   # Pointing R to $CUSTOMER CRAN mirror
   printf "\nlocal({ \n  r <- getOption('repos') \n  r['CRAN'] <- '$CRAN_MIRROR_URL' \n options(repos = r) \n})\n" >> /home/ubuntu/.Rprofile && \
   \
   # Pointing pip to $CUSTOMER PyPi mirror
   printf "[global]\nindex-url=$CUSTOMER_PYPI_MIRROR\ntrusted-host=$IP_OR_FQDN" > /etc/pip.conf && \
   \
   chown -R ubuntu:ubuntu /home/ubuntu /opt/conda/
Domino Data LabKnowledge BaseData Science BlogTraining
Copyright © 2022 Domino Data Lab. All rights reserved.