devcontainer

This commit is contained in:
Liora Milbaum 2024-01-01 17:32:08 +02:00
parent edd1ab7bc3
commit 6e9cacd692
3 changed files with 23 additions and 0 deletions

4
.devcontainer/Dockerfile Normal file
View file

@ -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

View file

@ -0,0 +1,8 @@
{
"name": "llama.cpp",
"build": {
"dockerfile": "Dockerfile",
"context": ".."
},
"postStartCommand": ".devcontainer/start.sh"
}

11
.devcontainer/start.sh Executable file
View file

@ -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