nmfs-opensci / py-rocket-base

base jupyterhub image with Python and R. See packages for the images.
https://github.com/nmfs-opensci/py-rocket-base/pkgs/container/py-rocket-base
BSD 3-Clause "New" or "Revised" License
2 stars 0 forks source link

rocker.sh: figure out how to export variables to scripts #42

Closed eeholmes closed 1 week ago

eeholmes commented 1 week ago

To prevent " becoming %22 in things like "https://${R_VERSION}", I had to do this var_assignment=$(echo "$line" | sed 's/^ENV //g' | sed 's/"//g')

to get rid of " so this R_VERSION="4.4.1" becomes export R_VERSION=4.4.1

this will cause problems when exporting things which have a $ like in this file. https://github.com/rocker-org/rocker-versioned2/blob/master/dockerfiles/cuda_4.4.1.Dockerfile

figure out a more robust solution

eeholmes commented 1 week ago

eval "export $var_assignment" worked