Other dockerfile.
This commit is contained in:
parent
0b80a928eb
commit
7cb6abdf2f
|
@ -4,3 +4,4 @@ server/transformers
|
||||||
server/flash-attention
|
server/flash-attention
|
||||||
cmake-build-debug/
|
cmake-build-debug/
|
||||||
cmake-build-release/
|
cmake-build-release/
|
||||||
|
Dockerfile*
|
||||||
|
|
|
@ -3,11 +3,22 @@
|
||||||
# docker build -t tgi-nix-builder -f Dockerfile.nix
|
# docker build -t tgi-nix-builder -f Dockerfile.nix
|
||||||
# docker run --log-driver=none tgi-nix-builder | docker load
|
# docker run --log-driver=none tgi-nix-builder | docker load
|
||||||
|
|
||||||
FROM nixos/nix:2.18.8
|
FROM nixos/nix:2.18.8 AS builder
|
||||||
RUN echo "experimental-features = nix-command flakes" >> /etc/nix/nix.conf
|
RUN echo "experimental-features = nix-command flakes" >> /etc/nix/nix.conf
|
||||||
RUN nix profile install nixpkgs#cachix
|
RUN nix profile install nixpkgs#cachix
|
||||||
RUN cachix use text-generation-inference
|
RUN cachix use text-generation-inference
|
||||||
WORKDIR /root
|
WORKDIR /root
|
||||||
ADD . .
|
ADD . .
|
||||||
RUN nix build .#dockerImageStreamed
|
RUN nix build .
|
||||||
ENTRYPOINT ./result
|
RUN mkdir /tmp/nix-store-closure
|
||||||
|
RUN cp -R $(nix-store -qR result/) /tmp/nix-store-closure
|
||||||
|
|
||||||
|
FROM ubuntu:24.04
|
||||||
|
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
# Copy /nix/store
|
||||||
|
COPY --from=builder /tmp/nix-store-closure /nix/store
|
||||||
|
COPY --from=builder /root/result /app
|
||||||
|
RUN ldconfig
|
||||||
|
CMD ["ldconfig", "/app/bin/text-generation-launcher"]
|
||||||
|
|
Loading…
Reference in New Issue