You could use toolbox. Create a toolbox container with toolbox create then use it with toolbox enter. I’m pretty sure python3 is part of F31SB (yup, just verified it) as it is also part of F31WS, and it likely is part of the toolbox image created. I guess then you would just install TensorFlow in toolbox with dnf install <TensorFlowPkgName> from within the toolbox container you created, if you chose to run it inside of a toolbox. Conversely, if it is available as a package that you would normally install on Fedora Workstation via DNF, you could use rpm-ostree to layer with rpm-ostree install <TensorFlowPkgName>.
I am uncertain of that, my Python experiences are limited. Having said that, if you install as user, it may (and likely will) install specifically for that user, and consequently in your home dir likely in .local/share or maybe even .var/app such as the flatpaks do. So it would then be not a layered package but a local one, if that makes sense.
I install with pip3 on silverblue all the time. In my case I prefer installing pip packages to my home directory with the user flag, since I often find myself needing the package inside a Toolbox as well as outside (if the package is in the home directory, it will work on both).
Example: pip3 install --user ansible
I THINK installing with pip without the user flag will result in a usr local install, which is okay with silverblue (unlike usr bin, which is sacred and needs layering to change). But I haven’t tried it in a while since I prefer the user flag anyway.
I seem to have issues installing some things with conda and pip3.
Im not sure how valid it is but i read from multiple sources that its faster to install tensorflow via conda, for god knows what reason i cant install tensorflow-gpu 2.1 or 2.0 via Conda in a toolbox. Could anyone try and tell me if it works for you?
First by trying out conda, I installed it inside toolbox and did this:
⬢ conda create -p ~/bin/conda ⬢ conda activate bin/conda # and one more command to initialize bashrc
But conda does not have version 2 of Tensorflow with Radeon support, so I removed it.
Now trying it the the pip way (inside toolbox) I cannot install it either: