Brianpuz commited on
Commit
3a90123
·
verified ·
1 Parent(s): 1859b4c

Change Dockerfile and start.sh to move building llama.cpp to the docker building process. Therefore, we can save time in dev mode to restart the app

Browse files
Files changed (1) hide show
  1. start.sh +1 -19
start.sh CHANGED
@@ -1,22 +1,4 @@
1
  #!/bin/bash
2
 
3
- if [ ! -d "llama.cpp" ]; then
4
- # only run in dev env
5
- git clone https://github.com/ggerganov/llama.cpp
6
- fi
7
-
8
- export GGML_CUDA=OFF
9
- if [[ -z "${RUN_LOCALLY}" ]]; then
10
- # enable CUDA if NOT running locally
11
- export GGML_CUDA=ON
12
- fi
13
- echo "GGML_CUDA=$GGML_CUDA"
14
-
15
- cd llama.cpp
16
- cmake -B build -DBUILD_SHARED_LIBS=OFF -DGGML_CUDA=${GGML_CUDA}
17
- cmake --build build --config Release -j --target llama-quantize llama-gguf-split llama-imatrix
18
- cp ./build/bin/llama-* .
19
- rm -rf build
20
-
21
- cd ..
22
  python app.py
 
1
  #!/bin/bash
2
 
3
+ cd /app
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4
  python app.py