From 755361b932acccf803c7a718b7441aa79c006567 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dani=C3=ABl=20de=20Kok?= Date: Sat, 28 Sep 2024 21:10:33 +0200 Subject: [PATCH] Example of building the Docker image using Nix inside Docker --- Dockerfile.nix | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 Dockerfile.nix diff --git a/Dockerfile.nix b/Dockerfile.nix new file mode 100644 index 00000000..29158bea --- /dev/null +++ b/Dockerfile.nix @@ -0,0 +1,13 @@ +# Build the image and get out the docker file: +# +# docker build -t tgi-nix -f Dockerfile.nix +# docker run --rm --volume $PWD/data:/data tgi-nix cp -H result /data/tgi-docker.tar.gz +# docker load < tgi-docker.tar.gz + +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 .#dockerImage