Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it safe to install Tensorflow in an existing Conda environment?

I am looking into using Tensorflow for my research soon, and looked at the online documentation for installing with Conda https://www.tensorflow.org/versions/r0.11/get_started/os_setup.html#anaconda-installation.

It suggested creating a new environment, and installing Tensorflow in it, and the installing other python packages afterwards.

But I already have an existing environment with lots of packages I need, and I'm wondering if its safe to add Tensorflow into that environment?

Also, I have a question about how this installation with conda works. I know that Conda will create a distinct set of folders containing the libraries needed for each environment, but if I install Tensorflow, what happens to all the base low level C++ and CUDA libraries that get compiled? Do they reside in my Conda environment's folder, or are they in some system wide libraries closer to my root?

PS: I'm using Ubuntu 16.04, and have a GPU that I want to run Tensorflow on.

Thank you.

like image 793
AKKA Avatar asked Sep 07 '25 14:09

AKKA


1 Answers

But I already have an existing environment with lots of packages I need, and I'm wondering if its safe to add Tensorflow into that environment?

conda has this awesome feature called "revisions". You can show your current environment with

conda list --revisions

which allows you to revert changes to your conda environment. This allows you to install new packages with confidence that if something breaks you can always revert it later. See this page for more info: https://www.continuum.io/blog/developer/advanced-features-conda-part-2. tl;dr: conda install --revisions <revision_number>

what happens to all the base low level C++ and CUDA libraries that get compiled

Are you talking about the libraries that get compiled when you are trying to run your code? Or the C++/CUDA libraries? If you're talking about the C++/CUDA libs then conda is not compiling them, but merely installing a pre-compiled binary into a specific location that gets picked up. If you're talking about your code, then where exactly those files live would seem to depend on where you put them.

like image 145
Eric Dill Avatar answered Sep 11 '25 00:09

Eric Dill