From 9959b1f374e19d38a649d77792cb1310862802c1 Mon Sep 17 00:00:00 2001 From: Bernat Vadell Date: Tue, 14 Mar 2023 15:46:03 +0100 Subject: [PATCH] split dockerfile into main & tools --- .devops/main.Dockerfile | 18 ++++++++++++++++++ Dockerfile => .devops/tools.Dockerfile | 10 ++-------- 2 files changed, 20 insertions(+), 8 deletions(-) create mode 100644 .devops/main.Dockerfile rename Dockerfile => .devops/tools.Dockerfile (70%) diff --git a/.devops/main.Dockerfile b/.devops/main.Dockerfile new file mode 100644 index 000000000..cd575efa0 --- /dev/null +++ b/.devops/main.Dockerfile @@ -0,0 +1,18 @@ +ARG UBUNTU_VERSION=22.04 + +FROM ubuntu:$UBUNTU_VERSION as build + +RUN apt-get update && \ + apt-get install -y build-essential + +WORKDIR /app + +COPY . . + +RUN make + +FROM ubuntu:$UBUNTU_VERSION as runtime + +COPY --from=build /app/main /main + +ENTRYPOINT [ "/main" ] \ No newline at end of file diff --git a/Dockerfile b/.devops/tools.Dockerfile similarity index 70% rename from Dockerfile rename to .devops/tools.Dockerfile index a0f87de9b..1cb2123cc 100644 --- a/Dockerfile +++ b/.devops/tools.Dockerfile @@ -10,12 +10,6 @@ RUN pip install --upgrade pip setuptools wheel \ WORKDIR /app -COPY . . +COPY ./convert-pth-to-ggml.py . -RUN make - -FROM ubuntu:$UBUNTU_VERSION as runtime - -COPY --from=build /app/main /main - -ENTRYPOINT [ "/main" ] \ No newline at end of file +ENTRYPOINT ["python3", "convert-pth-to-ggml.py"] \ No newline at end of file