Skip to content

Conversation

@jsl12
Copy link
Contributor

@jsl12 jsl12 commented May 29, 2025

Fixes #2288

@chatziko
Copy link
Contributor

This does not seem like a proper solution to me:

  1. By the time the container runs there might be an even newer version of pip, so the problem is not solved
  2. It causes a larger docker image.

Better to pass --disable-pip-version-check to pip install, this version check makes little sense for containers.

@acockburn
Copy link
Member

Since this is cosmetic, I'll hold off on merging this immediately and we will review

@jsl12
Copy link
Contributor Author

jsl12 commented May 29, 2025

Although I do run NixOS as a daily driver, I've never really gotten into its ability to build OCI images, but I'm very interested in doing so. Happy to discuss further if you've got some suggestions or experience with it

@jsl12
Copy link
Contributor Author

jsl12 commented May 30, 2025

Like I mentioned, I don't really have any experience with building Docker images from nix, but this is my general understanding of the situation:

  • Docker was initially based on LXC containers and eventually morphed into what it is today. They essentially created the OCI standard, so their images are of course compliant
  • The OCI standard is just about the resultant container, so they can be built in different ways.
  • Nix is able to build the containers with layers side-by-side instead of top-down because of the isolation of the nix store
  • When a dependency changes, only the layer for that dependency changes

@markusressel
Copy link
Contributor

Seems a bit excessive to me to rewrite the whole container toolchain because of a warning that doesn't really affect anything. Wouldn't it be good enough to add --disable-pip-version-check for the time beeing and create a separate issue/PR about the toolchain stuff?

@jsl12
Copy link
Contributor Author

jsl12 commented Jun 2, 2025

To be clear, if we were to start a nix-built OCI image, it wouldn't be to address this pip issue, although it would. It would be because it'a a good idea generally. It would allow anyone with nix installed (and flakes enabled) to set up a complete dev environment with variables, shell aliases, build tools, everything, all installed and configured to every minute detail, with a single command. You wouldn't even have to clone manually

Imagine...

nix develop github:appdaemon/appdaemon

For example, this is what my devenv setup looks like:

  • Neither uv or python are even installed to begin with
  • ads is my alias for "AppDaemon shell", which just activates the shell provided by the flake
  • There's a nice printout of what URL , branch, commit hash, and versions you're on when the shell activates
  • Once in the shell, you can use uv and python commands normally

image

@acockburn acockburn merged commit 88bfab3 into dev Jun 4, 2025
13 checks passed
@jsl12 jsl12 deleted the pip-upgrade branch June 4, 2025 21:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

A new release of pip is available: 25.0.1 -> 25.1.1

5 participants