I'm trying to set up an RStudio environment to study deep learning, running R/RStudio 4.3.1 on a university cluster desktop under ubuntu 22.04, using CUDA-11.6 and a GPU. The desktop is set up by the cluster, so I don't have access to how the desktop actually manages the GPU. acsess. I have asked the admins to help me with this. But my experience has raised a couple of questions about my workspace setup.
I use the following set up within RStudio:
library(reticulate)
virtualenv_create("r-reticulate", python = install_python())
library(keras)
install_keras(envname = "r-reticulate")
(R studio restarts here)
library(tensorflow)
install_tensorflow(envname = "r-tensorflow", version = '2.15')
According to Deep Learning with R, 2nd edition, installing keras, among other things, also loads tensorflow. But when I run install_keras() alone, my code can't find an installed tensorflow. The error language suggests running the above command to "install_tensorflow(envname = "r-tensorflow"). Now everything seems to work correctly other than that any tensorflow command can't find the GPU, so that I can only use CPU hardware.
My two questions:
a. Does the current version of keras::install_keras() actually still also install tensorflow, as stated in the Deep Learning book? If so, why does R not then find the tensorflow?
b. "Install_tensorflow(envname = 'r-reticulate')" doesn't work. I need to use "(install_tensorflow(envname = 'r-tensorflow)". Does the use of two different environments for reticulate/keras and for tensorflow cause problems?
My understanding is that the environments work basically to install specific versions of various packages for a given application, and that this is achieved by modifying the path variable to point to the specific instances of packages within the specified environments. I would have thought that installing tensorflow within the r-reticulate environment would avoid problems with the path, but if I install tensorflow to the r-reticulate environment, R can't find the tensor flow.
I'm obviously something of a newbie to deep learning (but with years of experience with R and RStudio). I would deeply appreciate any help understanding better how the environments work to point to specific package versions. Many thanks in advance. Larry