diff --git a/Dockerfile b/Dockerfile index 71ef91b..3ad170e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,32 +1,32 @@ -FROM nvidia/cuda:12.2.2-cudnn8-runtime-ubuntu22.04 +FROM nvidia/cuda:12.4.1-runtime-ubuntu22.04 ENV DEBIAN_FRONTEND=noninteractive -RUN apt-get update && \ - apt-get install -y \ - software-properties-common +RUN apt-get update +RUN apt-get install -y software-properties-common +RUN add-apt-repository -y ppa:deadsnakes/ppa +RUN apt-get update +RUN apt-get install -y --no-install-recommends python3.11 python3.11-venv python3-pip vim git pciutils +RUN update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.11 1 +RUN apt-get -y clean +RUN rm -rf /var/lib/apt/lists/* -COPY requirements.txt / +ENV NVIDIA_VISIBLE_DEVICES all +ENV NVIDIA_DRIVER_CAPABILITIES compute +ENV DEBIAN_FRONTEND=dialog -ADD cs[s] /app/css -ADD im[g] /app/img -ADD j[s] /app/js -ADD l10[n] /app/l10n ADD li[b] /app/lib ADD model[s] /app/models ADD default_confi[g] /app/default_config -RUN add-apt-repository -y ppa:deadsnakes/ppa -RUN apt-get update -RUN apt-get install -y python3.11 -RUN apt-get install -y python3.11-venv -RUN apt-get install -y python3.11-dev -RUN apt-get install -y python3-pip - -ENV CMAKE_ARGS="-DLLAMA_CUDA=on" - -RUN \ - python3 -m pip install -r requirements.txt && rm -rf ~/.cache && rm requirements.txt +# Install requirements +COPY requirements.txt / +RUN python3.11 -m pip install --no-cache-dir --upgrade pip setuptools wheel +RUN python3.11 -m pip install llama-cpp-python --extra-index-url https://abetlen.github.io/llama-cpp-python/whl/cu124 +# RUN python3 -m pip install -vvv --no-cache-dir https://github.com/abetlen/llama-cpp-python/releases/download/v0.2.81-cu124/llama_cpp_python-0.2.81-cp311-cp311-linux_x86_64.whl +# https://github.com/abetlen/llama-cpp-python/releases/download/v0.2.81-cu122/llama_cpp_python-0.2.81-cp311-cp311-linux_x86_64.whl +RUN sed -i '/llama_cpp_python/d' requirements.txt +RUN python3.11 -m pip install --no-cache-dir --no-deps -r requirements.txt WORKDIR /app/lib ENTRYPOINT ["python3", "main.py"] diff --git a/Makefile b/Makefile index 2a21a34..a39927c 100644 --- a/Makefile +++ b/Makefile @@ -21,7 +21,7 @@ help: .PHONY: build-push build-push: docker login ghcr.io - docker buildx build --push --platform linux/amd64 --tag ghcr.io/nextcloud/llm2:1.1.0 . + docker build --push --platform linux/amd64 --tag ghcr.io/nextcloud/llm2:1.2.4 . .PHONY: download-models download-models: diff --git a/appinfo/info.xml b/appinfo/info.xml index 84aa310..4dcfdba 100644 --- a/appinfo/info.xml +++ b/appinfo/info.xml @@ -9,7 +9,7 @@ See [the nextcloud admin docs](https://docs.nextcloud.com/server/latest/admin_manual/ai/index.html) for more information. ]]> - 1.2.3 + 1.2.4 MIT Marcel Klehr Alexander Piskun @@ -25,7 +25,7 @@ See [the nextcloud admin docs](https://docs.nextcloud.com/server/latest/admin_ma ghcr.io nextcloud/llm2 - 1.2.3 + 1.2.4 AI_PROVIDERS