mirror of
https://github.com/huggingface/text-generation-inference.git
synced 2025-05-31 19:22:07 +00:00
This avoids storing a Docker image tarball in the image. Instead, stream the layers while doing `docker run`.
14 lines
400 B
Nix
14 lines
400 B
Nix
# Build the image and get out the docker file:
|
|
#
|
|
# docker build -t tgi-nix-builder -f Dockerfile.nix
|
|
# docker run tgi-nix-builder | docker load
|
|
|
|
FROM nixos/nix:2.18.8
|
|
RUN echo "experimental-features = nix-command flakes" >> /etc/nix/nix.conf
|
|
RUN nix profile install nixpkgs#cachix
|
|
RUN cachix use text-generation-inference
|
|
WORKDIR /root
|
|
ADD . .
|
|
RUN nix build .#dockerImageStreamed
|
|
ENTRYPOINT ./result
|