File tree Expand file tree Collapse file tree 4 files changed +10
-3
lines changed Expand file tree Collapse file tree 4 files changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,6 @@ WORKDIR /app
1414
1515COPY . .
1616
17- RUN make
17+ RUN make && make server
1818
1919ENTRYPOINT ["/app/.devops/tools.sh" ]
Original file line number Diff line number Diff line change @@ -16,6 +16,8 @@ elif [[ $arg1 == '--quantize' || $arg1 == '-q' ]]; then
1616 ./quantize $arg2
1717elif [[ $arg1 == ' --run' || $arg1 == ' -r' ]]; then
1818 ./main $arg2
19+ elif [[ $arg1 == ' --serve' || $arg1 == ' -s' ]]; then
20+ ./server $arg2
1921elif [[ $arg1 == ' --all-in-one' || $arg1 == ' -a' ]]; then
2022 echo " Converting PTH to GGML..."
2123 for i in ` ls $1 /$2 /ggml-model-f16.bin* ` ; do
3537 echo " ex: \" /models/7B/\" 1"
3638 echo " --quantize (-q): Optimize with quantization process ggml"
3739 echo " ex: \" /models/7B/ggml-model-f16.bin\" \" /models/7B/ggml-model-q4_0.bin\" 2"
40+ echo " --serve (-s): Run the server"
41+ echo " ex: -m /models/7B/ggml-model-q4_0.bin -host 0.0.0.0 -port 8080"
3842 echo " --all-in-one (-a): Execute --convert & --quantize"
3943 echo " ex: \" /models/\" 7B"
4044fi
Original file line number Diff line number Diff line change @@ -211,7 +211,7 @@ jobs:
211211 run : |
212212 mkdir build
213213 cd build
214- cmake .. ${{ matrix.defines }}
214+ cmake .. ${{ matrix.defines }} -DLLAMA_BUILD_SERVER=ON
215215 cmake --build . --config Release
216216 cp ../LICENSE ./bin/Release/llama.cpp.txt
217217
@@ -292,7 +292,7 @@ jobs:
292292 run : |
293293 mkdir build
294294 cd build
295- cmake .. -DLLAMA_CUBLAS=ON
295+ cmake .. -DLLAMA_CUBLAS=ON -DLLAMA_BUILD_SERVER=ON
296296 cmake --build . --config Release
297297
298298 - name : Get commit hash
Original file line number Diff line number Diff line change @@ -237,6 +237,9 @@ embedding: examples/embedding/embedding.cpp build-info.h ggml.o llama.o common.o
237237save-load-state : examples/save-load-state/save-load-state.cpp build-info.h ggml.o llama.o common.o $(OBJS )
238238 $(CXX ) $(CXXFLAGS ) $(filter-out % .h,$^ ) -o $@ $(LDFLAGS )
239239
240+ server : examples/server/server.cpp build-info.h ggml.o llama.o common.o $(OBJS )
241+ $(CXX ) $(CXXFLAGS ) $(filter-out % .h,$^ ) -o $@ $(LDFLAGS )
242+
240243build-info.h : $(wildcard .git/index) scripts/build-info.sh
241244 @sh scripts/build-info.sh > $@ .tmp
242245 @if ! cmp -s $@ .tmp $@ ; then \
You can’t perform that action at this time.
0 commit comments