Skip to content

Commit 73dcabe

Browse files
authored
Merge pull request #301 from nmfs-opensci/eeholmes-patch-1
Fix LD_LIBRARY_PATH
2 parents 34a21ad + 7f1ef47 commit 73dcabe

2 files changed

Lines changed: 7 additions & 6 deletions

File tree

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ LABEL org.opencontainers.image.author="eli.holmes@noaa.gov"
55
LABEL org.opencontainers.image.source=https://github.com/nmfs-opensci/py-rocket-base
66
LABEL org.opencontainers.image.description="Python (3.11), R (4.5.1), Desktop and Publishing tools"
77
LABEL org.opencontainers.image.licenses=Apache2.0
8-
LABEL org.opencontainers.image.version=2026.02.07
8+
LABEL org.opencontainers.image.version=2026.02.12
99

1010
USER root
1111

scripts/install-rocker.sh

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -151,8 +151,9 @@ Sys.setenv(PATH = paste("/srv/conda/envs/notebook/bin", Sys.getenv("PATH"), sep
151151
IRkernel::installspec(name = "ir4", displayname = "R ${R_VERSION}", user = FALSE)
152152
EOF
153153
# fix SSL mismatch when using reticulate in R
154-
echo "Configuring RStudio LD_LIBRARY_PATH in rserver.conf for proper SSL behavior when using conda env..."
155-
echo "rsession-ld-library-path=/srv/conda/envs/notebook/lib" >> /etc/rstudio/rserver.conf
154+
# Do not do this as it breaks R functions that use GDAL
155+
# echo "Configuring RStudio LD_LIBRARY_PATH in rserver.conf for proper SSL behavior when using conda env..."
156+
# echo "rsession-ld-library-path=/srv/conda/envs/notebook/lib" >> /etc/rstudio/rserver.conf
156157
# Add this so that we make it easier to restore the PATH after reticulate::use_conda() adds conda to it. reticulate does not have deactivate function.
157158
echo "RSTUDIO_CLEAN_PATH=${PATH}" >> "${R_HOME}/etc/Renviron.site"
158159
# Do not do this. This will put conda on the system PATH and break R spatial packages due to GDAL mismatches
@@ -163,9 +164,9 @@ cat << 'EOF' >> "${R_HOME}/etc/Rprofile.site"
163164
164165
setHook(packageEvent("reticulate", "attach"), function(...) {
165166
message(
166-
"Use py_require() for Python interoperability without altering PATH.\n",
167-
"Use use_condaenv('notebook') to use conda environment but this will alter PATH and may break R functions.\n",
168-
"Restart R to reset PATH or store PATH before calling use_condaenv('notebook') and restore when done."
167+
"Use py_require() for Python interoperability without altering PATH and GDAL dynamic linking.\n",
168+
"use_condaenv('notebook') will alter PATH and GDAL linking and can break R functions that use GDAL.\n",
169+
"See https://nmfs-opensci.github.io/py-rocket-base documentation for instructions."
169170
)
170171
})
171172
EOF

0 commit comments

Comments
 (0)