tensorflow / tensorflow/models
Object detection API installation does not recognize tensorflow-gpu==2.5.0 already installed in the Conda virtual environment
@pkulzc is already working on this.
Since Sep 20, 2021.
- Dominant language
- Python
- Stars
- 77.7k
- Forks
- 44.8k
- PR merge metrics
- No merged PRs in 30d
Description
Prerequisites
Please answer the following questions for yourself before submitting an issue.
- I am using the latest TensorFlow Model Garden release and TensorFlow 2.
- I am reporting the issue to the correct repository. (Model Garden official or research directory)
- I checked to make sure that this issue has not already been filed.
1. The entire URL of the file you are using
https://github.com/tensorflow/models/blob/master/research/object_detection/packages/tf2/setup.py
2. Describe the bug
Running setup.py to install object detection API installs tensorflow==2.6.0 official in my Conda virtual environment. tensorflow-gpu==2.5.0 was already installed in the environment, and it should be used instead.
The behavior is similar to the complaint in issue #9267, except that was in a docker container. In my case, it's the Conda virtual environment.
Is this a bug? Or is it something wrong with my Conda configuration?
3. Steps to reproduce
Follow the steps below to reproduce the bug.
nano conda-env-tf25-cuda11-p36.yaml
name: env-test
channels:
- conda-forge
- defaults
dependencies:
- pip=21.2.4=pyhd8ed1ab_0
- python=3.6.13=hb7a2778_1_cpython
- flatbuffers==1.12
- matplotlib==3.3.4
- numpy==1.19.5
- pandas==1.1.5
- pillow==8.3.2
- tensorboard==2.5.0
- pip:
- opencv-python==4.5.3.56
- opencv-python-headless==4.5.3.56
- protobuf==3.17.3
- scipy==1.5.4
- tensorflow-gpu==2.5.0
conda -V
conda 4.10.3
conda env create --file conda-env-tf25-cuda11-p36.yaml --force
conda activate env-test
python -c 'import tensorflow as tf; print(tf.__version__)'
2021-09-17 17:33:17.425787: I tensorflow/stream_executor/platform/default/dso_loader.cc:53] Successfully opened dynamic library libcudart.so.11.0
2.5.0
git clone https://github.com/tensorflow/models.git
cd models/research
protoc object_detection/protos/*.proto --python_out=.
cp object_detection/packages/tf2/setup.py .
python -m pip install --use-feature=2020-resolver .
(Terminal displayed information about many packages being installed)
python -c 'import tensorflow as tf; print(tf.__version__)'
2.6.0
Not only was the Tensorflow version changed from 2.5.0 to 2.6.0, but also no CUDA information was displayed.
4. Expected behavior
tensorflow-gpu==2.5.0 in the Conda virtual environment should not be replaced by Tensorflow 2.6.0 CPU.
5. Additional context
Include any logs that would be helpful to diagnose the problem.
6. System information
- OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Linux Ubuntu 18.04
- Mobile device name if the issue happens on a mobile device:
- TensorFlow installed from (source or binary): Binary
- TensorFlow version (use command below): tensorflow-gpu==2.5.0
- Python version: 3.6.13
- Bazel version (if compiling from source):
- GCC/Compiler version (if compiling from source):
- CUDA/cuDNN version: CUDA 11.0/cuDNN 8.2.4
- GPU model and memory: GeForce RTS 2080 TI
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.