You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This works nicely in an older rocker/rstudio image based on Ubuntu22.04.4, with R-python 3.10.12, R-4.4.1
This fails on the rocker/ml images based on Ubuntu22.04.3 with nvidia cuda stuff installed, also with R-python 3.10.12 and R-4.4.1
I have rocker-org/rocker-versioned2#880 as initially I thought that would be a rocker/ml issue.
I have a workaround now to install as shown above, and for usage
## Does not work:
R -e 'tensorflow::as_tensor("Hello World")' ;
## Workaround:
R -e 'reticulate::use_virtualenv("/root/.virtualenvs/r-tensorflow", required = TRUE); library(tensorflow); tensorflow::as_tensor("Hello World")'
I also leave below my output from debugging. I was curious about the error for tf_config(),
this comes because python_version can be print()ed, but not cat()ed.
[Sorry, premature send, there was a new-style GitHub send button, which I mis-interpreted as "save draft". I'll update and polish this issue, until then please consider as WIP]
Also, it looks like you're using {keras} with the latest tensorflow. Note that the latest tensorflow depends on {keras3}, and new code today should generally prefer to use {keras3}. If you really want to use "legacy" keras with the latest tensorflow, you have to take some extra steps (py_install("tf-keras"); Sys.setenv(TF_USE_LEGACY_KERAS=1) probably some other steps too (not tested, but it wouldn't surprise me if import("tf_keras", as = "keras") is also needed).
[thanks @t-kalinowski for your response, I was since editing my issue and adding the workaround]
Hi,
I am installing (and testing) tensorflow using
This works nicely in an older
rocker/rstudio
image based on Ubuntu22.04.4, with R-python 3.10.12, R-4.4.1This fails on the
rocker/ml
images based on Ubuntu22.04.3 with nvidia cuda stuff installed, also with R-python 3.10.12 and R-4.4.1I have rocker-org/rocker-versioned2#880 as initially I thought that would be a
rocker/ml
issue.I have a workaround now to install as shown above, and for usage
So all left now is possibly to add your suggestions to https://tensorflow.rstudio.com/install/
I also leave below my output from debugging. I was curious about the error for
tf_config()
,this comes because
python_version
can beprint()
ed, but notcat()
ed.Yours,
Steffen
Digging into the
tf_config()
error above:The text was updated successfully, but these errors were encountered: