Spaces:
Build error
Build error
Overhaul to use precompiled binaries
Browse filesLlamacpp has been adding a lot of CUDA kernels, this causes compile time concerns on the HF spaces.
To ensure everything keeps working smoothly the space is now using our precompiled binary, this ensures maximum compatibility between the different GPU's and also severely reduces the time it takes to build the space.
12341 unmodified line678910111213141516171819FROM nvidia/cuda:12.1.1-devel-ubuntu22.04ARG MODELARG IMGMODELARG WHISPERMODEL1 unmodified lineARG MODEL_NAMEARG ADDITIONALRUN mkdir /opt/koboldcppRUN apt update && apt install git build-essential libopenblas-dev wget python3-pip -yRUN git clone https://github.com/lostruins/koboldcpp /opt/koboldcppWORKDIR /opt/koboldcppCOPY default.json /opt/koboldcpp/default.jsonRUN make -j$(nproc) LLAMA_OPENBLAS=1 LLAMA_CUBLAS=1 LLAMA_PORTABLE=1 LLAMA_COLAB=1RUN wget -O model.ggml $MODEL || trueRUN wget -O imgmodel.ggml $IMGMODEL || trueRUN wget -O mmproj.ggml $MMPROJ || trueRUN wget -O whispermodel.ggml $WHISPERMODEL || trueCMD /bin/python3 ./koboldcpp.py --model model.ggml --whispermodel whispermodel.ggml --sdmodel imgmodel.ggml --sdthreads 4 --sdquant --sdclamped --mmproj mmproj.ggml $ADDITIONAL --port 7860 --hordemodelname $MODEL_NAME --hordemaxctx 1 --hordegenlen 1 --preloadstory default.json --ignoremissing12341 unmodified line6789101112131415161718FROM ubuntuARG MODELARG IMGMODELARG WHISPERMODEL1 unmodified lineARG MODEL_NAMEARG ADDITIONALRUN mkdir /opt/koboldcppRUN apt update && apt install curl -yWORKDIR /opt/koboldcppCOPY default.json /opt/koboldcpp/default.jsonRUN curl -fLo koboldcpp https://koboldai.org/cpplinuxcu12RUN chmod +x ./koboldcppRUN curl -fLo model.ggml $MODEL || trueRUN curl -fLo imgmodel.ggml $IMGMODEL || trueRUN curl -fLo mmproj.ggml $MMPROJ || trueRUN curl -fLo whispermodel.ggml $WHISPERMODEL || trueCMD ./koboldcpp --model model.ggml --whispermodel whispermodel.ggml --sdmodel imgmodel.ggml --sdthreads 4 --sdquant --sdclamped --mmproj mmproj.ggml $ADDITIONAL --port 7860 --hordemodelname $MODEL_NAME --hordemaxctx 1 --hordegenlen 1 --preloadstory default.json --ignoremissing
Dockerfile+9-10