Skip to content
This repository has been archived by the owner on Oct 31, 2023. It is now read-only.

Remove torch.cuda check in setup.py #572

Closed
wants to merge 1 commit into from

Conversation

eskjorg
Copy link

@eskjorg eskjorg commented Mar 15, 2019

Let's say you want to run docker build on a machine without a GPU (for later use on a machine with GPU). In that case, only the CUDA_HOME is not None should be enough if CUDA is installed in the base image.

torch.cuda.is_available() on the other hand would evaluate to false. Or is there any important reason keep that check?

See hack at:
#167 (comment)

@facebook-github-bot facebook-github-bot added the CLA Signed Do not delete this pull request or issue due to inactivity. label Mar 15, 2019
@fmassa
Copy link
Contributor

fmassa commented Mar 25, 2019

Thanks for the PR, but I'm afraid that this will cause problems for a number of other users, so I'd rather not bias towards this use-case I think.

@eskjorg
Copy link
Author

eskjorg commented Mar 25, 2019

Thanks for the PR, but I'm afraid that this will cause problems for a number of other users, so I'd rather not bias towards this use-case I think.

Just out of curiosity, do you know any example use cases in which problems could arise?

@fmassa
Copy link
Contributor

fmassa commented Mar 26, 2019

Say you have some bits of the CUDA installed in your machine (even if you don't have GPUs). That was a requirement for Caffe to install if I remember properly.
Now you'd try to compile the extensions and I'm really not sure this would work out fine or give weird problems to CPU-only users.

The docker setup is an optional setup in maskrcnn-benchmark. The recommended installation instructions are by using conda, and this has worked out well so far, so I'd rather not change it.

In order for `docker build` to work. See hack at:
facebookresearch#167 (comment)
@miguelvr
Copy link
Contributor

The PR in #612 should fix the issue.

@eskjorg
Copy link
Author

eskjorg commented Mar 28, 2019

Great! Closing this.

@eskjorg eskjorg closed this Mar 28, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
CLA Signed Do not delete this pull request or issue due to inactivity.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants