Skip to content
This repository was archived by the owner on Jan 27, 2026. It is now read-only.

fix: update docker files and readme command#239

Merged
drbh merged 2 commits intomainfrom
improve-docker-quickstart
Oct 3, 2025
Merged

fix: update docker files and readme command#239
drbh merged 2 commits intomainfrom
improve-docker-quickstart

Conversation

@drbh
Copy link
Collaborator

@drbh drbh commented Oct 1, 2025

This PR bumps the Docker images from nix 2.18 to 2.23, fixes the override logic when flake.nix points to a local path, and updates the README with a simpler Docker command that works more reliably than the old one.

Copy link
Contributor

@MekkCyber MekkCyber left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks ! LGTM

&& echo "max-jobs = $MAX_JOBS" >> /etc/nix/nix.conf \
&& echo "cores = $CORES" >> /etc/nix/nix.conf \
&& nix profile install nixpkgs#cachix nixpkgs#git-lfs nixpkgs#jq \
&& nix profile install --impure nixpkgs#cachix nixpkgs#git-lfs nixpkgs#jq \
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is --impure needed?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not 100% sure, however after bumping the nix version attempts to build the docker image would throw

 => ERROR [2/5] RUN echo "experimental-features = nix-command flakes" >> /etc/nix/nix.conf     && echo "max-jobs = 4" >>  0.3s
------
 > [2/5] RUN echo "experimental-features = nix-command flakes" >> /etc/nix/nix.conf     && echo "max-jobs = 4" >> /etc/nix/nix.conf     && echo "cores = 4" >> /etc/nix/nix.conf     && nix profile install nixpkgs#cachix nixpkgs#git-lfs nixpkgs#jq     && cachix use huggingface:
0.265 error: access to absolute path '/nix/store/s5yzzaspkgxmhhf9dvc7yj459czh3zn2-user-environment' is forbidden in pure evaluation mode (use '--impure' to override)
------
Dockerfile:8
--------------------
   7 |     # Combine RUN commands to reduce layers and improve caching
   8 | >>> RUN echo "experimental-features = nix-command flakes" >> /etc/nix/nix.conf \
   9 | >>>     && echo "max-jobs = $MAX_JOBS" >> /etc/nix/nix.conf \
  10 | >>>     && echo "cores = $CORES" >> /etc/nix/nix.conf \
  11 | >>>     && nix profile install nixpkgs#cachix nixpkgs#git-lfs nixpkgs#jq \
  12 | >>>     && cachix use huggingface
  13 |     # Copy external files
--------------------
ERROR: failed to solve: process "/bin/sh -c echo \"experimental-features = nix-command flakes\" >> /etc/nix/nix.conf     && echo \"max-jobs = $MAX_JOBS\" >> /etc/nix/nix.conf     && echo \"cores = $CORES\" >> /etc/nix/nix.conf     && nix profile install nixpkgs#cachix nixpkgs#git-lfs nixpkgs#jq     && cachix use huggingface" did not complete successfully: exit code: 1

which seem to suggest that the more recent version of nix dis allow accessing the user env without impure..

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apparently it's fixed in 2.25.3: https://discourse.nixos.org/t/nix-profile-install-errors-wants-impure/39793/4

It looks looks like my machine is using 2.30.3 without issues, maybe we should update to

FROM nixos/nix:2.30.3

?

@drbh drbh mentioned this pull request Oct 3, 2025
Copy link
Member

@danieldk danieldk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! 🚀

@drbh drbh merged commit e13610a into main Oct 3, 2025
27 checks passed
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 this pull request may close these issues.

3 participants