domino logo
5.0
  • Overview
  • Domino Cloud
  • Code Assist
  • Get started
  • Work with data
  • Develop models
  • Scale out distributed computing
  • Deploy models
  • Monitor models
  • Publish apps
  • Projects
  • Collaborate
  • Workspaces
  • Jobs
  • Environments
  • Executions
  • Launchers
  • Environment variables
  • Secure credential store
  • Organizations
  • Domino API
  • Domino CLI
  • Troubleshooting
  • Get help
  • Additional Resources
domino logo
About Domino
Domino Data LabKnowledge BaseData Science BlogTraining
>
User Guide
>
Environments
>
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:

USER root

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/

USER ubuntu
Domino Data Lab
Knowledge Base
Data Science Blog
Training
Copyright © 2022 Domino Data Lab. All rights reserved.