This repository was archived by the owner on Jan 27, 2026. It is now read-only.
Merged
Conversation
danieldk
reviewed
Oct 3, 2025
dockerfiles/Dockerfile
Outdated
| && 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 \ |
Collaborator
Author
There was a problem hiding this comment.
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..
Member
There was a problem hiding this comment.
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
?
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.