From 0f0bae88892b48e6e9d9ef4067ce2f784816ce28 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niklas=20M=C3=BCller?= Date: Wed, 20 Dec 2023 11:48:18 +0100 Subject: [PATCH] INIT --- .gitignore | 5 ----- Dockerfile | 22 ++++++++++++++++++++++ init.sh | 7 +++++++ 3 files changed, 29 insertions(+), 5 deletions(-) create mode 100644 Dockerfile create mode 100644 init.sh diff --git a/.gitignore b/.gitignore index 8c2b884..7178bc0 100644 --- a/.gitignore +++ b/.gitignore @@ -1,10 +1,5 @@ # ---> VisualStudioCode .vscode/* -!.vscode/settings.json -!.vscode/tasks.json -!.vscode/launch.json -!.vscode/extensions.json -!.vscode/*.code-snippets # Local History for Visual Studio Code .history/ diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..6f3626e --- /dev/null +++ b/Dockerfile @@ -0,0 +1,22 @@ +################################################################ +# +# Project: llamafile +# +# docker build -t llamafile . +# docker run -p 8102:8080 -it --name llamafile -t llamafile +# +################################################################ + +FROM ubuntu:jammy-20231128 + +# set the working directory +WORKDIR /app +RUN apt-get update +RUN apt-get install wget -y + +# download and prepare llamafile +RUN wget https://huggingface.co/jartine/llava-v1.5-7B-GGUF/resolve/main/llava-v1.5-7b-q4-server.llamafile?download=true -O /app/llava-v1.5-7b-q4-server.llamafile +RUN chmod +x /app/llava-v1.5-7b-q4-server.llamafile + +COPY ./init.sh /app +CMD ["bash", "init.sh"] diff --git a/init.sh b/init.sh new file mode 100644 index 0000000..efeca1e --- /dev/null +++ b/init.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +env >> /etc/environment + +/app/llava-v1.5-7b-q4-server.llamafile --host 0.0.0.0 + +/bin/bash \ No newline at end of file