Henk717 commited on
Commit
015004d
1 Parent(s): ec210a9

Make GPU parameters optional and easier to manage

Browse files
Files changed (2) hide show
  1. Dockerfile +2 -2
  2. README.md +1 -3
Dockerfile CHANGED
@@ -1,12 +1,12 @@
1
  FROM nvidia/cuda:11.8.0-devel-ubuntu22.04
2
  ARG MODEL
3
  ARG MODEL_NAME
4
- ARG CONTEXT_SIZE
5
  RUN mkdir /opt/koboldcpp
6
  RUN apt update && apt install git build-essential libopenblas-dev wget python3-pip -y
7
  RUN git clone https://github.com/lostruins/koboldcpp /opt/koboldcpp
8
  WORKDIR /opt/koboldcpp
9
  RUN make LLAMA_OPENBLAS=1 LLAMA_CUBLAS=1 LLAMA_PORTABLE=1
10
  RUN wget -O model.ggml $MODEL
11
- CMD /bin/python3 ./koboldcpp.py --model model.ggml --usecublas --gpulayers 99 --multiuser --contextsize $CONTEXT_SIZE --port 7860 --hordeconfig $MODEL_NAME 1 1
12
 
 
1
  FROM nvidia/cuda:11.8.0-devel-ubuntu22.04
2
  ARG MODEL
3
  ARG MODEL_NAME
4
+ ARG ADDITIONAL
5
  RUN mkdir /opt/koboldcpp
6
  RUN apt update && apt install git build-essential libopenblas-dev wget python3-pip -y
7
  RUN git clone https://github.com/lostruins/koboldcpp /opt/koboldcpp
8
  WORKDIR /opt/koboldcpp
9
  RUN make LLAMA_OPENBLAS=1 LLAMA_CUBLAS=1 LLAMA_PORTABLE=1
10
  RUN wget -O model.ggml $MODEL
11
+ CMD /bin/python3 ./koboldcpp.py --model model.ggml $ADDITIONAL --port 7860 --hordeconfig $MODEL_NAME 1 1
12
 
README.md CHANGED
@@ -24,7 +24,5 @@ This space was designed to be easy to clone, first make sure you convert your mo
24
 
25
  If you have a GPU available for your space, clone this space and point the MODEL variable to your model's download location, then force a rebuild so it can use your own custom model. You can customize the model that is being displayed by setting the MODEL_NAME.
26
 
27
- Want to run on the CPU tier? The following line enables multiuser GPU usage.
28
- , "--usecublas", "mmq", "--gpulayers", "99", "--multiuser", "--contextsize", "4096"
29
- If you remove this from the CMD in the Dockerfile your instance will now be compatible with CPU only usage.
30
 
 
24
 
25
  If you have a GPU available for your space, clone this space and point the MODEL variable to your model's download location, then force a rebuild so it can use your own custom model. You can customize the model that is being displayed by setting the MODEL_NAME.
26
 
27
+ In additional variable we configured the parameters required to run this on a GPU and support multiple users and high context, if you wish to clone this to a CPU space simply leave that blank.
 
 
28