I am running Rstudio-server (open source) v1.2.5036 on an Enterprise Linux Red Hat 7 machine. My R version is 3.6.2 and is configured to use Intel's MKL BLAS. I have installed keras with a tensorflow-gpu backend (using
library(keras); install_keras(tensorflow = 'gpu'). Note that at the time of writing this post, these versions represent the most up-to-date versions, and on my Arch Linux home server, the same versions work without any problems.
Problem description and steps to reproduce
I am able to load keras in both the Rstudio-server GUI as well as on command line (using SSH). However, Rstudio-server (to be specific: the rsession it spawned) immediately crashes when performing any keras operation, e.g.
k <- backend() or
model <- keras_model_sequential(). Typically, I get no error message, but instead the GUI just hangs until I restart the session.
Both of these operations work as expected in a command line R environment, and my GPU is initialized correctly by tensorflow.
The output of
reticulate::py_config() is the same for Rstudio-server and command line R:
version: 3.6.7 | packaged by conda-forge | (default, Nov 6 2019, 16:19:42) [GCC 7.3.0]
Troubleshooting steps undertaken to this point
- I have reinstalled tensorflow and keras
- To exclude that this issue had anything to do with my PATH, I have attempted to copy the environmental variables as displayed by
Sys.getenv()from the command line R version to R_HOME/etc/Renviron.site. Even though the variables did show up as changed in the Rstudio-server environment, this did not solve my problem.
** Similar questions **
- https://github.com/rstudio/keras/issues/824 (reinstalling did not solve my issue)
- Seems to be the same issue, recent post, unfortunately closed without answer
Any ideas on how to solve this? Thanks much for any input!