From 35cb2282f046c32aad0129655471214aeac4babb Mon Sep 17 00:00:00 2001 From: Etienne Perot Date: Wed, 6 Mar 2024 14:06:53 -0800 Subject: [PATCH] Add a single-model ollama image. Yes, it's yet another huge image (26GB) :) This image is useful to benchmark checkpoint/restore performance. To fairly measure it, we need an image that has only one model preloaded into it, as this mirrors the situation where someone might want to use checkpoint/restore for an inference model where there is only one model to serve. This image uses mixtral as a medium-large model. The larger the model, the more important the gains in checkpoint/restore performance, so measuring with a large model provides a more representative and significant result. PiperOrigin-RevId: 613335037 --- images/gpu/ollama/singlemodel/Dockerfile | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 images/gpu/ollama/singlemodel/Dockerfile diff --git a/images/gpu/ollama/singlemodel/Dockerfile b/images/gpu/ollama/singlemodel/Dockerfile new file mode 100644 index 000000000..50147f866 --- /dev/null +++ b/images/gpu/ollama/singlemodel/Dockerfile @@ -0,0 +1,15 @@ +# https://hub.docker.com/r/ollama/ollama +FROM ollama/ollama:0.1.26 + +ENV PATH=$PATH:/usr/local/nvidia/bin:/bin/nvidia/bin +ENV OLLAMA_ORIGINS=* +ENV OLLAMA_HOST=0.0.0.0:11434 + +# Pre-install a single model. +RUN bash -c ' \ + ( ollama serve ) & serverpid="$!"; \ + sleep 5; \ + ollama pull mixtral:instruct && \ + kill "$serverpid" && \ + wait "$serverpid" \ +'