From 40e1260fb8e39589d0f4502a306c7403afd93602 Mon Sep 17 00:00:00 2001 From: Simon Li Date: Wed, 19 Jun 2024 12:22:42 +0100 Subject: [PATCH 1/2] Add hic-windows-nicedcv-example --- configs/hic-windows-nicedcv-example.yml | 36 +++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 configs/hic-windows-nicedcv-example.yml diff --git a/configs/hic-windows-nicedcv-example.yml b/configs/hic-windows-nicedcv-example.yml new file mode 100644 index 0000000..d6cf979 --- /dev/null +++ b/configs/hic-windows-nicedcv-example.yml @@ -0,0 +1,36 @@ +--- +name: "hic-windows-nicedcv-example" + +base: + # E.g. DCV-Windows-2023.1.16388-DOD-78-2023-12-20T09-36-56.648Z + name: "DCV-Windows-2023*-DOD-*" + owner: "amazon" + +template: + name: windows + +# subnet_id: + +instance: + type: t3.2xlarge + volume_size: 50 + +env: + - "AUTOHIBERNATE_TIME=120" + +modules: + - aws_ec2launch + - 7zip + - conda + - dbeaver + - firefox + - libreoffice + - notepad++ + - rstudio + - ssms + - vscode + - autohibernate + +files: + - src: conda-envs/example.yml + dst: conda-environment.yml From e20e4b8abb8cb3f60b363332245639db736fdf44 Mon Sep 17 00:00:00 2001 From: Simon Li Date: Wed, 19 Jun 2024 13:36:47 +0100 Subject: [PATCH 2/2] 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 | 17 +++++++++++------ templates/default.j2 | 6 ++++++ 5 files changed, 44 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) %}