diff --git a/.env b/.env index 7d85058..ee93515 100644 --- a/.env +++ b/.env @@ -1,11 +1,10 @@ -MODEL_DIR=/media/teamgroup/models -MODEL=dolphin-2.6-mistral-7b-dpo-exl2 -EXTENSIONS_DIR=/home/me/git_repos/extensions/ -CHARACTERS_DIR=/media/teamgroup/characters -SETTINGS_DIR=/media/teamgroup/settings -COMMITHASH=1edf321362b3f5b3c2486fca8fd3931628c8b669 +MODEL_DIR=/media/sandisk/models +MODEL=Hyperion-3.0-Mistral-7B-alpha-exl2-8_0 +EXTENSIONS_DIR=~./git_repos/extensions/ +CHARACTERS_DIR=./characters +SETTINGS_DIR=./settings LOGS_DIR=./logs -DATASETS_DIR=/media/teamgroup/loras/datasets -LORAS_DIR=/media/teamgroup/loras +DATASETS_DIR=./datasets +LORAS_DIR=./loras PRESETS_DIR=./presets PROMPTS_DIR=./prompts diff --git a/.gitignore b/.gitignore index a190eaa..668a9bf 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,9 @@ docker_build.log nohup.out presets/ prompts/ +characters/ +settings/ +datasets/ +loras/ +dev_build.sd +release.sh \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index a90e9da..72c990f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,7 +2,7 @@ FROM nvidia/cuda:12.1.1-devel-ubuntu22.04 as builder # Using conda to transfer python env from builder to runtime later -COPY --from=continuumio/miniconda3:23.5.2-0 /opt/conda /opt/conda +COPY --from=continuumio/miniconda3:23.10.0-1 /opt/conda /opt/conda ENV PATH=/opt/conda/bin:$PATH # Update base image @@ -12,32 +12,30 @@ RUN apt-get update && apt-get upgrade -y \ && mkdir -p /etc/OpenCL/vendors && echo "libnvidia-opencl.so.1" > /etc/OpenCL/vendors/nvidia.icd # Create new conda environment -RUN conda create -y -n textgen python=3.11.5 +RUN conda create -y -n textgen python=3.11.8 SHELL ["conda", "run", "-n", "textgen", "/bin/bash", "-c"] ENV CUDA_DOCKER_ARCH=all +ARG CACHEBUST=1 + # Installing torch and ninja -RUN pip3 install torch torchvision torchaudio xformers --index-url https://download.pytorch.org/whl/cu121 +RUN pip3 install torch==2.2.* torchvision==0.17.* torchaudio==2.2.* xformers --index-url https://download.pytorch.org/whl/cu121 RUN pip3 install ninja packaging sentence-transformers ARG clone_arg ARG commit -ARG CACHEBUST=1 # Pulling latest text-generation-webui branch RUN git clone https://github.com/oobabooga/text-generation-webui/ $clone_arg \ && cd text-generation-webui \ && if [ -n "$commit" ]; then git checkout $commit; fi \ - && pip3 install -r requirements.txt + && pip3 install -r requirements.txt --upgrade # Install all the extension requirements RUN bash -c 'for i in text-generation-webui/extensions/*/requirements.txt ; do pip3 install -r $i ; done' -# Prepare cache for faster first time runs -- removed until its fixed -#RUN cd /text-generation-webui/extensions/openai/ && python3 cache_embedding_model.py - RUN conda clean -afy # Using ubuntu 22.04 for runtime diff --git a/README.md b/README.md index 0a0e066..cb85f11 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,7 @@ Next, build the image. This will use the latest from the text-generation-webui r ```sh cd text-generation-webui-docker -docker build -t text-generation-webui-docker:latest . +docker build -t text-gen-ui-gpu:latest . ``` Alternatively you can run the build script, which will also just pull latest unless you have a COMMITHASH variable in a .env file or specify a commit while running the script like below: @@ -42,12 +42,10 @@ cd text-generation-webui-docker ./build.sh 7a3ca2c68f1ca49ac4e4b62f016718556fd3805c ``` -(note it will call it noneabove1182/text-generation-webui-docker since that's what I use, and tag it as well, may change this later) - # Running the image with docker run ```sh -docker run --gpus all -p 7860:7860 -v /media/teamgroup/models:/models -v ./logs:/logs text-generation-webui-docker:latest --model WizardLM-13B-V1.1-GPTQ --chat --listen --listen-port 7860 +docker run --gpus all -p 7860:7860 -v /media/teamgroup/models:/models -v ./logs:/logs text-gen-ui-gpu:latest --model WizardLM-13B-V1.1-GPTQ --chat --listen --listen-port 7860 ``` # Running the image with docker compose diff --git a/build.sh b/build.sh index 6754bd6..f04a077 100755 --- a/build.sh +++ b/build.sh @@ -6,4 +6,4 @@ LATEST_COMMIT=$(curl -s $REPO_URL | grep 'sha' | cut -d\" -f4 | head -n 1) echo $LATEST_COMMIT -docker build --build-arg commit="$LATEST_COMMIT" -t noneabove1182/text-gen-ui-gpu . +docker build --build-arg commit="$LATEST_COMMIT" -t text-gen-ui-gpu . diff --git a/dev_build.sh b/dev_build.sh index 867f6ea..5c18681 100755 --- a/dev_build.sh +++ b/dev_build.sh @@ -1,3 +1,3 @@ #!/bin/bash -docker build --build-arg CACHEBUST=$(date +%s) --build-arg clone_arg="--branch dev" -t noneabove1182/text-gen-ui-gpu . +docker build --build-arg CACHEBUST=$(date +%s) --build-arg clone_arg="--branch gradio4" -t text-gen-ui-gpu . diff --git a/docker-compose.yml b/docker-compose.yml index b94c055..330fe8b 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -18,6 +18,8 @@ services: - '5000:5000' image: 'noneabove1182/text-gen-ui-gpu:latest' environment: + - PUID=1000 + - PGID=1000 - OPENEDAI_EMBEDDING_DEVICE=cuda ulimits: memlock: -1 @@ -30,7 +32,7 @@ services: reservations: devices: - driver: nvidia - count: 1 + device_ids: [ '1', '0' ] capabilities: [ gpu ] command: [ diff --git a/release.sh b/release.sh old mode 100755 new mode 100644