From 6e9cacd6921f61aa9ab3769d9093a341f29a1425 Mon Sep 17 00:00:00 2001 From: Liora Milbaum Date: Mon, 1 Jan 2024 17:32:08 +0200 Subject: [PATCH] devcontainer --- .devcontainer/Dockerfile | 4 ++++ .devcontainer/devcontainer.json | 8 ++++++++ .devcontainer/start.sh | 11 +++++++++++ 3 files changed, 23 insertions(+) create mode 100644 .devcontainer/Dockerfile create mode 100644 .devcontainer/devcontainer.json create mode 100755 .devcontainer/start.sh diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile new file mode 100644 index 000000000..4e2d75442 --- /dev/null +++ b/.devcontainer/Dockerfile @@ -0,0 +1,4 @@ +FROM quay.io/fedora/fedora:38 + +RUN dnf install -y python3 make gcc-c++ pip git git-lfs && \ + dnf clean all diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 000000000..b6df98e56 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,8 @@ +{ + "name": "llama.cpp", + "build": { + "dockerfile": "Dockerfile", + "context": ".." + }, + "postStartCommand": ".devcontainer/start.sh" +} diff --git a/.devcontainer/start.sh b/.devcontainer/start.sh new file mode 100755 index 000000000..364c76108 --- /dev/null +++ b/.devcontainer/start.sh @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +make -j +cd models +git lfs install +git clone https://huggingface.co/mistralai/Mistral-7B-Instruct-v0.1 +cd .. +pip install -r requirements.txt +./convert.py models/Mistral-7B-Instruct-v0.1/ +./quantize models/Mistral-7B-Instruct-v0.1/ggml-model-f16.gguf Q4_K_M +./server -m models/Mistral-7B-Instruct-v0.1/ggml-model-Q4_K_M.gguf