-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Dockerfile with pipenv takes a long time #3856
Comments
It typically happens when your dependencies include some scientific packages, read #3830 for knowledge of why it is difficult to improve. What you can do at the best now, is to 1) make sure the lockfile is correctly matching the content of Pipfile, so you won't need to lock during docker build, which is super slow, and 2) try another pypi mirror which is relatively faster on your machine, with |
TL;DR @itye-msft I have a similar issue, and have been tweaking my "pipenv in docker" pattern for years now. I solved this by This both doesn't update packages by "surprise" during build, and it installs the exact versions specified in my lock file, all in addition to the time savings. (There's also the annoying issue that if the Since I'm only locking at "run" time, I keep the pip and pipenv cache in an internal docker volume, so that the cache drastically speeds up subsequent locks too. I can provide you my library that sets these things up if you require more information on my pattern. |
@andyneff I need more information from you to build, can you post it? |
@928234269, I'll try... I have this "bash" system I use to build and run my dockers (called just). It's basically just a large case statement that executes commands I want (like a make file would). A lot of the rough edges of having all the various moving pieces are held together using this. I thought it was better to expose all those nasty little details rather than cut everything out I thought was irrelevant because there are usually a few interconnected pieces that I forget are important in the end.
|
In my case I add |
A lot has changed since this issue was opened, please update to latest pipenv which is much more performant. |
Hello pipenv community,
In a larger project I have a dockerfile heavily based on pipenv and it takes forever to build. There are other dockerfiles during the make process, but this specific one really takes so much time, and it makes no sense.
I would appreciate your suggestions of how to improve it.
The dockerfile is taken from Presidio project and it's part of the make process.
Here is the --support data (sorry it's so long)
$ pipenv --support
Pipenv version:
'2018.11.26'
Pipenv location:
'/usr/local/Cellar/pipenv/2018.11.26_2/libexec/lib/python3.7/site-packages/pipenv'
Python location:
'/usr/local/Cellar/pipenv/2018.11.26_2/libexec/bin/python3.7'
Python installations found:
3.7.3
:/Users/ityer/.local/share/virtualenvs/presidio-analyzer-F1SRmeOI/bin/python3
3.7.3
:/usr/local/bin/python3
3.7.3
:/usr/local/bin/python3.7m
2.7.10
:/usr/bin/python
2.7.10
:/usr/bin/pythonw
2.7.10
:/usr/bin/python2.7
PEP 508 Information:
System environment variables:
PATH
TERM_PROGRAM
PRESIDIO_LABEL
PIP_PYTHON_PATH
SHELL
TERM
TMPDIR
Apple_PubSub_Socket_Render
TERM_PROGRAM_VERSION
TERM_SESSION_ID
ZSH
USER
COMMAND_MODE
SSH_AUTH_SOCK
__CF_USER_TEXT_ENCODING
VIRTUAL_ENV
PAGER
LSCOLORS
PIPENV_ACTIVE
_
PWD
ITERM_PROFILE
XPC_FLAGS
PYTHONDONTWRITEBYTECODE
XPC_SERVICE_NAME
COLORFGBG
HOME
SHLVL
ITERM_SESSION_ID
LOGNAME
LESS
PIP_DISABLE_PIP_VERSION_CHECK
LC_CTYPE
DOCKER_REGISTRY
GOPATH
SECURITYSESSIONID
COLORTERM
PIP_SHIMS_BASE_MODULE
PYTHONFINDER_IGNORE_UNSUPPORTED
Pipenv–specific environment variables:
PIPENV_ACTIVE
:1
Debug–specific environment variables:
PATH
:/usr/local/Cellar/pipenv/2018.11.26_2/libexec/tools:/Users/ityer/.local/share/virtualenvs/presidio-analyzer-F1SRmeOI/bin:/Users/ityer/go/bin:/bin:/usr/local/Cellar/pipenv/2018.11.26_2/libexec/tools:/Users/ityer/go/bin:/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/go/bin
SHELL
:/bin/zsh
PWD
:/Users/ityer/go/src/github.com/Microsoft/presidio/presidio-analyzer
VIRTUAL_ENV
:/Users/ityer/.local/share/virtualenvs/presidio-analyzer-F1SRmeOI
Contents of
Pipfile
('/Users/ityer/go/src/github.com/Microsoft/presidio/presidio-analyzer/Pipfile'):Contents of
Pipfile.lock
('/Users/ityer/go/src/github.com/Microsoft/presidio/presidio-analyzer/Pipfile.lock'):The text was updated successfully, but these errors were encountered: