-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
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
Streamline docker usage #49981
Streamline docker usage #49981
Conversation
&& python setup.py build_ext -j 4 \ | ||
&& python -m pip install --no-build-isolation -e . | ||
RUN python -m pip install --upgrade pip | ||
RUN python -m pip install --use-deprecated=legacy-resolver \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
--use-deprecated=legacy-resolver
is in place because the new pip resolver seems to download multiple package versions to (I assume) check dependencies via setup.py or pyproject.yml. Some of our dependencies (ex: boto3) have a ton of releases, so it makes for a painfully slow process
Possible resolutions to use the newer solver I think are
- CI: add minimal requirements file #48828
- https://pip.pypa.io/en/stable/topics/dependency-resolution/#possible-ways-to-reduce-backtracking
So either reduce the number of dependencies, add a floor to their version or set up a constraint file once after solving
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or use mamba, which has a decent dependency resolver ...
Is this compatible with VSCode's |
Good question...at the very least it should match whatever the previous image had in terms of compatibility, but also not a VSCode user. Maybe @MarcoGorelli knows? |
@natmokval I think you said you were using Docker? Was it via vscode? If so, just tagging in case you felt like having a look
I don't remember any specific requirements in terms of compatibility when I tried it years' ago, but I'll give this a go |
I think this line will need changing: Line 13 in 39e0964
Anyway, I tried out the rest in vscode, and it worked perfectly, well done! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's ship this, thanks @WillAyd !
|
||
# Configure apt and install packages | ||
RUN apt-get update \ | ||
&& apt-get -y install --no-install-recommends apt-utils git tzdata dialog 2>&1 \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you know if those packages are not actually needed anymore? Especially tzdata
seems to have been added on purpose to have the timezone tests working: #46219
(we copied this for the gitpod docker file as well, but so if it's no longer needed, we can clean that up there as well)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tzdata is already installed on the image. I'm guessing either from the base python image or may be included as part of the base ubuntu
Hi @MarcoGorelli , I use docker with VSCode, but without |
Awesome thanks @MarcoGorelli for the VSCode help |
Is it OK to backport this so that the correct instructions show up in the |
I am fine with that |
@meeseeksdev please backport to 1.5.x |
Backport PR #49981: Streamline docker usage Co-authored-by: William Ayd <will_ayd@innobi.io>
Took a look at this setup today and found a few things that could be improved to make it easier for new contributors. Some quick comparisons:
The remaining bottleneck with image creation is #48828