tensorflow / tensorflow/models
Pip installs tensorflow==2.3.0 even though tensorflow-gpu==2.2.0 is already installed in the docker container
@pkulzc is already working on this.
Since Sep 21, 2020.
- 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/dockerfiles/tf2/Dockerfile
https://github.com/tensorflow/models/blob/master/research/object_detection/packages/tf2/setup.py
2. Describe the bug
Pip installs tensorflow==2.3.0, the package already installed in the docker image (tensorflow-gpu==2.2.0) should be used instead.
https://github.com/tensorflow/models/blob/ba206271e7cf574713a3a790b4b7fde76bf3fe3e/research/object_detection/dockerfiles/tf2/Dockerfile#L1
https://github.com/tensorflow/models/blob/ba206271e7cf574713a3a790b4b7fde76bf3fe3e/research/object_detection/dockerfiles/tf2/Dockerfile#L39
Note that the last line installs this setup.py.
This issue is possibly related to https://github.com/tensorflow/models/issues/9012, however the main reason why this issue occurs at all is because the tf-models-official package requires tensorflow, but tensorflow-gpu is installed.
3. Steps to reproduce
Build the docker image via docker build -f research/object_detection/dockerfiles/tf2/Dockerfile -t od ..
4. Expected behavior
Pip does not download tensorflow as tensorflow-gpu is already installed.
5. Additional context
Step 14/15 : RUN python -m pip install .
---> Running in 59f9ee2f3ff9
[...]
Collecting tf-models-official
Downloading tf_models_official-2.3.0-py2.py3-none-any.whl (840 kB)
[...]
Collecting tensorflow>=2.3.0
Downloading tensorflow-2.3.0-cp36-cp36m-manylinux2010_x86_64.whl (320.4 MB)
[...]
Successfully installed Cython-0.29.21 apache-beam-2.24.0 attrs-20.2.0 avro-python3-1.10.0 certifi-2020.6.20 contextlib2-0.6.0.post1 cycler-0.10.0 dataclasses-0.7 dill-0.3.1.1 dm-tree-0.1.5 docopt-0.6.2 fastavro-0.23.6 future-0.18.2 gin-config-0.3.0 google-api-core-1.22.2 google-api-python-client-1.12.1 google-auth-1.21.2 google-auth-httplib2-0.0.4 google-cloud-bigquery-1.27.2 google-cloud-core-1.4.1 google-crc32c-1.0.0 google-resumable-media-1.0.0 googleapis-common-protos-1.52.0 grpcio-1.32.0 hdfs-2.5.8 httplib2-0.17.4 kaggle-1.5.8 keras-preprocessing-1.1.2 kiwisolver-1.2.0 matplotlib-3.3.2 mock-2.0.0 oauth2client-3.0.0 object-detection-0.1 opencv-python-headless-4.4.0.42 pandas-1.1.2 pbr-5.5.0 promise-2.3
protobuf-3.13.0 psutil-5.7.2 py-cpuinfo-7.0.0 pyarrow-0.17.1 pycocotools-2.0.2 pydot-1.4.1 pymongo-3.11.0 pyparsing-2.4.7 python-dateutil-2.8.1 python-slugify-4.0.1 pytz-2020.1 pyyaml-5.3.1 requests-2.24.0 sentencepiece-0.1.91 slugify-0.0.1 tensorboard-2.3.0 tensorflow-2.3.0 tensorflow-addons-0.11.2 tensorflow-datasets-3.2.1 tensorflow-estimator-2.3.0 tensorflow-hub-0.9.0 tensorflow-metadata-0.24.0 tensorflow-model-optimization-0.5.0 text-unidecode-1.3 tf-models-official-2.3.0 tf-slim-1.1.0 tqdm-4.49.0 typeguard-2.9.1 typing-extensions-3.7.4.3 uritemplate-3.0.1
[...]
---> a2c56cdd6a98
6. System information
- OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Docker 19.03.12 build 48a66213fe on x86_64
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.