Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Building from Dockerfile errors on pip install #3933

Closed
Snertie opened this issue Feb 1, 2022 · 7 comments
Closed

Building from Dockerfile errors on pip install #3933

Snertie opened this issue Feb 1, 2022 · 7 comments

Comments

@Snertie
Copy link

Snertie commented Feb 1, 2022

Instructions To Reproduce the 🐛 Bug:

  1. Full runnable code or full changes you made:
    https://github.com/facebookresearch/detectron2/blob/main/docker/Dockerfile#L17
RUN wget https://bootstrap.pypa.io/get-pip.py && \
	python3 get-pip.py --user && \
	rm get-pip.py
  1. What exact command you run: docker build .
  2. Full logs or other relevant observations:
 > [ 7/13] RUN wget https://bootstrap.pypa.io/get-pip.py &&     python3 get-pip.py --user &&    rm get-pip.py:                                                              
#10 0.302 --2022-02-01 11:28:27--  https://bootstrap.pypa.io/get-pip.py                                                                                                     
#10 0.304 Resolving bootstrap.pypa.io (bootstrap.pypa.io)... 151.101.36.175, 2a04:4e42:9::175                                                                               
#10 0.342 Connecting to bootstrap.pypa.io (bootstrap.pypa.io)|151.101.36.175|:443... connected.                                                                             
#10 0.406 HTTP request sent, awaiting response... 200 OK
#10 0.428 Length: 2609829 (2.5M) [text/x-python]
#10 0.429 Saving to: 'get-pip.py'
#10 0.432 
#10 0.432      0K .......... .......... .......... .......... ..........  1% 2.12M 1s
#10 0.452     50K .......... .......... .......... .......... ..........  3% 8.65M 1s
...
#10 0.686   2450K .......... .......... .......... .......... .......... 98% 8.50M 0s
#10 0.691   2500K .......... .......... .......... .......... ........  100% 23.6M=0.3s
#10 0.693 
#10 0.693 2022-02-01 11:28:28 (9.40 MB/s) - 'get-pip.py' saved [2609829/2609829]
#10 0.693 
#10 0.730 ERROR: This script does not work on Python 3.6 The minimum supported Python version is 3.7. Please use https://bootstrap.pypa.io/pip/3.6/get-pip.py instead.
------
executor failed running [/bin/sh -c wget https://bootstrap.pypa.io/get-pip.py &&        python3 get-pip.py --user &&    rm get-pip.py]: exit code: 1

  1. please simplify the steps as much as possible so they do not require additional resources to
    run, such as a private dataset.
  • Download repository
  • Build from Dockerfile

Possible Fix:

Update the link to download the desired pip version:
https://bootstrap.pypa.io/pip/3.6/get-pip.py

Environment:

Local environment from where Docker is executed:

---------------------  -----------------------------------------------------------------------------------------
sys.platform           darwin
Python                 3.7.8 (v3.7.8:4b47a5b6ba, Jun 27 2020, 04:47:50) [Clang 6.0 (clang-600.0.57)]
numpy                  1.19.3
detectron2             0.6 @/Users/bertleroy/git/detectron-model/venv/src/detectron2/detectron2
Compiler               clang 11.0.3
CUDA compiler          not available
DETECTRON2_ENV_MODULE  <not set>
PyTorch                1.9.0 @/Users/bertleroy/git/detectron-model/venv/lib/python3.7/site-packages/torch
PyTorch debug build    False
GPU available          No: torch.cuda.is_available() == False
Pillow                 8.0.1
torchvision            0.10.0 @/Users/bertleroy/git/detectron-model/venv/lib/python3.7/site-packages/torchvision
fvcore                 0.1.5.post20220119
iopath                 0.1.9
cv2                    4.2.0
---------------------  -----------------------------------------------------------------------------------------
PyTorch built with:
  - GCC 4.2
  - C++ Version: 201402
  - clang 12.0.0
  - Intel(R) Math Kernel Library Version 2020.0.1 Product Build 20200208 for Intel(R) 64 architecture applications
  - Intel(R) MKL-DNN v2.1.2 (Git Hash 98be7e8afa711dc9b66c8ff3504129cb82013cdb)
  - NNPACK is enabled
  - CPU capability usage: AVX2
  - Build settings: BLAS_INFO=mkl, BUILD_TYPE=Release, CXX_COMPILER=/Applications/Xcode-12.0.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++, CXX_FLAGS= -Wno-deprecated -fvisibility-inlines-hidden -Wno-deprecated-declarations -DUSE_PTHREADPOOL -DNDEBUG -DUSE_KINETO -DLIBKINETO_NOCUPTI -DUSE_FBGEMM -DUSE_QNNPACK -DUSE_PYTORCH_QNNPACK -DUSE_XNNPACK -DSYMBOLICATE_MOBILE_DEBUG_HANDLE -O2 -fPIC -Wno-narrowing -Wall -Wextra -Werror=return-type -Wno-missing-field-initializers -Wno-type-limits -Wno-array-bounds -Wno-unknown-pragmas -Wno-sign-compare -Wno-unused-parameter -Wno-unused-variable -Wno-unused-function -Wno-unused-result -Wno-unused-local-typedefs -Wno-strict-overflow -Wno-strict-aliasing -Wno-error=deprecated-declarations -Wno-error=pedantic -Wno-error=redundant-decls -Wno-error=old-style-cast -Wno-invalid-partial-specialization -Wno-typedef-redefinition -Wno-unknown-warning-option -Wno-unused-private-field -Wno-inconsistent-missing-override -Wno-aligned-allocation-unavailable -Wno-c++14-extensions -Wno-constexpr-not-const -Wno-missing-braces -Qunused-arguments -fcolor-diagnostics -fno-math-errno -fno-trapping-math -Werror=format -Werror=cast-function-type -Wno-unused-private-field -Wno-missing-braces -Wno-c++14-extensions -Wno-constexpr-not-const, LAPACK_INFO=mkl, PERF_WITH_AVX=1, PERF_WITH_AVX2=1, PERF_WITH_AVX512=1, TORCH_VERSION=1.9.0, USE_CUDA=OFF, USE_CUDNN=OFF, USE_EXCEPTION_PTR=1, USE_GFLAGS=OFF, USE_GLOG=OFF, USE_MKL=ON, USE_MKLDNN=ON, USE_MPI=OFF, USE_NCCL=OFF, USE_NNPACK=ON, USE_OPENMP=OFF, 

@Snertie Snertie changed the title Please read & provide the following Building from Dockerfile errors on pip install Feb 1, 2022
@ppwwyyxx
Copy link
Contributor

ppwwyyxx commented Feb 3, 2022

Thanks, the solution you mentioned looks like the right fix. Would you like to send a PR?

@Abanoub-G
Copy link

Hi,
That solution seems to have worked for me too. Thanks.

facebook-github-bot pushed a commit that referenced this issue Feb 18, 2022
Summary:
Fixes #3933 #3935

Pull Request resolved: #3938

Reviewed By: tglik

Differential Revision: D34260775

Pulled By: zhanghang1989

fbshipit-source-id: 7914792de3db4e8ad2b21bdc635c60a1a8ac727c
@8infinitecloud
Copy link

8infinitecloud commented Jun 30, 2022

The solution for me was replace the line (-) por la line (+)

(-) RUN wget https://bootstrap.pypa.io/get-pip.py && \
(+) RUN wget https://bootstrap.pypa.io/pip/3.6/get-pip.py && \
	python3 get-pip.py --user && \
	rm get-pip.py

Thanks!

@apd2599
Copy link

apd2599 commented Jul 5, 2022

Hey,

I ran the DockerFile with the updated lines, but a similar error appears when the file runs the command ERROR [12/13] RUN pip install --user -e detectron2_repo.

#15 19.10 ERROR: Package 'detectron2' requires a different Python: 3.6.9 not in '>=3.7'

executor failed running [/bin/sh -c pip install --user -e detectron2_repo]: exit code: 1

Any suggestions?

@8infinitecloud
Copy link

How is configure your dockerfile?
your is install pip with the comand wget https://bootstrap.pypa.io/get-pip.py && \ .. ?
change the line for wget https://bootstrap.pypa.io/pip/3.6/get-pip.py && \ and ready ..

@apd2599
Copy link

apd2599 commented Jul 5, 2022

Yes, I had those changes already when I cloned the repository.
The command with "wget https://bootstrap.pypa.io/pip/3.6/get-pip.py &&
python3 get-pip.py --user &&
rm get-pip.py"
works fine. Specifically, it is the line with pip install --user -e detectron2_repo

@farukcankaya
Copy link

I posted two solutions that worked for me here: #4394 (comment) it might help you, too.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 13, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants