'Switching the BLAS library used by R in the Docker image
I am developing a web application in R. It is supposed to run in a Docker container. Since I use the RMA method of the affy package, I have to use either libopenblas in a version earlier than 0.3.3, or another BLAS library (see https://support.bioconductor.org/p/117119/).
Currently I am trying to use atlas instead of openblas. My Docker image is based on the rocker/shiny image (https://hub.docker.com/r/rocker/shiny). The following is used as the standard BLAS package:
R version 4.0.5 (2021-03-31)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 20.04.4 LTS
Matrix products: default
BLAS/LAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.8.so
I used the update-alternatives script in the Dockerfile in order to change the default BLAS package:
update-alternatives --install /usr/lib/x86_64-linux-gnu/libopenblas.so libopenblas.so-x86_64-linux-gnu /usr/lib/x86_64-linux-gnu/atlas/libblas.so 150
I also tried different variations of the paths, e.g. updating for libopenblas.so.3 or libblas.so or libblas.so.3.
The executable of the docker image is defined via CMD ["Rscript", "run.R"].
Unfortunately, the used BLAS library is never changed. The output of sessionInfo() remains as specified above.
Solution 1:[1]
The problem was the base image. Changing the BLAS package is only possible using the rocker/r-base image.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | sida |
