From 7fd73a8a53792accf8897665270ae89c0f1a39bf Mon Sep 17 00:00:00 2001 From: Simon Li Date: Wed, 19 Jun 2024 12:57:09 +0100 Subject: [PATCH] Add `CONDA_PROXY_SERVER` and `CRAN_PROXY_SERVER` private_env This means installing conda and RStudio will not automatically configure a default server which is only useful for HIC-TRE images. --- modules/conda-setup.sh | 9 ++++++--- modules/conda.ps1 | 14 +++++++++----- modules/rstudio.ps1 | 17 ++++++++++++----- modules/rstudio.sh | 16 ++++++++++------ templates/default.j2 | 6 ++++++ 5 files changed, 43 insertions(+), 19 deletions(-) diff --git a/modules/conda-setup.sh b/modules/conda-setup.sh index e408983..2f84160 100644 --- a/modules/conda-setup.sh +++ b/modules/conda-setup.sh @@ -29,9 +29,12 @@ for env in "${SETUPDIR}"/conda-environment*.yml ; do ~/conda/bin/mamba env update --file "$env" done -echo "Setting default conda channel" -cat > "$HOME/.condarc" < "$HOME/.condarc" < "$HOME/.Rprofile" <> "$HOME/.Rprofile" <> "$HOME/.Renviron" sudo add-apt-repository -y ppa:c2d4u.team/c2d4u4.0+ diff --git a/templates/default.j2 b/templates/default.j2 index 2056a8f..19c2cb3 100644 --- a/templates/default.j2 +++ b/templates/default.j2 @@ -6,6 +6,12 @@ {% set env = env|default([],true) %} {% set private_env = private_env|default([],true) %} +{# For example, to configure an internal CRAN and conda proxy/repository: +{% set private_env = [ + "CONDA_PROXY_SERVER=http://conda.hic-tre.dundee.ac.uk", + "CRAN_PROXY_SERVER=http://cran.hic-tre.dundee.ac.uk/", +] %} +#} {% set modules = modules|default([],true) %} {% set security_modules = security_modules|default([],true) %}