Skip to content
This repository has been archived by the owner on Jan 9, 2024. It is now read-only.

documenting out-of-date tf post re cuda override #52

Merged
merged 7 commits into from
Feb 16, 2022

Conversation

ngam
Copy link
Contributor

@ngam ngam commented Feb 8, 2022

Xref: conda-forge/tensorflow-feedstock#174 and conda-forge/tensorflow-feedstock#189

Thanks to @hmaarrfk for the info and patience explaining this!

how to add a blog post

  1. Put your post in .rst format in the posts directory. Look at the other posts for the format.
    Make sure you have a .. post:: directive at the top and a section title at the top.
  2. You can build your post via the commands make clean, ablog build, and ablog serve.
  3. Checkout the results in your browser.
  4. When you are ready, make a PR!

@ngam
Copy link
Contributor Author

ngam commented Feb 8, 2022

@wolfv this PR follows #48 with minor clarifications / edits on overriding CUDA constraints on CPU-only machines. Note this was out of date --- credit to how fast things move at conda-forge 😄

Hopefully this is okay for now. I will be thinking more about adding more verbose details to the documentation later. I think we ought to have a more thorough "Getting Started" section with a lot of pointers and details about the general philosophy and how to get the most out of conda-forge/conda.

# OR
CONDA_CUDA_OVERRIDE="11.2" mamba install tensorflow -c conda-forge

Note that you should select the cudatoolkit version most appropraite for your GPU; currently, we have "10.2", "11.0", "11.1", and "11.2" available. If you want the slimmer "cpu-only" package, then you can install `tensorflow-cpu` directly. At the time of writing (February 2022), on a machine without a GPU, one would always get the `-cpu` variant unless overriden like above. This decision has been made to allow greater accessibility for users with limited bandwidth and resources.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This CUDA selection is done automatically when you have a GPU by calling nvidia-smi.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let me try to incorporate this into the text, paging @jakirkham for help in how to best phrase this.

@wolfv
Copy link
Member

wolfv commented Feb 8, 2022

I am fine with mentioning that:

if you want to forcibly install the GPU-enabled tensorflow package, even on a machien with no gpu available, then run CONDA_OVERRIDE_CUDA=X.X mamba install tensorflow-gpu

(note that I used the tensorflow-gpu package).

Co-authored-by: Chris Burr <chrisburr@users.noreply.github.com>
@ngam
Copy link
Contributor Author

ngam commented Feb 15, 2022

@wolfv since this was really your blog post, how do you feel about the edits? I am somewhat hesitant to push this further because it is like walking into a minefield with a lot of confusing and unresolved issues. So I am happy to drop this and leave the status quo as is. Let me know.

@wolfv
Copy link
Member

wolfv commented Feb 16, 2022

I am happy with the content. You could also add that to force a given version of cudatoolkit one could also specify it on the command line like cudatoolkit=11.2 etc.

@ngam
Copy link
Contributor Author

ngam commented Feb 16, 2022

I am happy with the content. You could also add that to force a given version of cudatoolkit one could also specify it on the command line like cudatoolkit=11.2 etc.

Good call

@wolfv wolfv merged commit 4af0ad0 into conda-forge:main Feb 16, 2022
@wolfv
Copy link
Member

wolfv commented Feb 16, 2022

Thanks!

@akapocsi
Copy link

Is it CONDA_OVERRIDE_CUDA or CONDA_CUDA_OVERRIDE? This blog post seems to indicate that it is the latter, but only the former works. https://conda-forge.org/blog/posts/2021-11-03-tensorflow-gp

@jakirkham
Copy link
Member

Looking at this doc, it appears to be the former

Would you be interested in submitting a PR to update the blogpost?

@akapocsi
Copy link

Looking at this doc, it appears to be the former

Would you be interested in submitting a PR to update the blogpost?

Sure! I’ll take a look.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

7 participants