Skip to content

Commit 92c9650

Browse files
committed
Add release script, update build script
1 parent 8cf1d53 commit 92c9650

File tree

4 files changed

+40
-5
lines changed

4 files changed

+40
-5
lines changed

.env

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
MODEL_DIR=/media/teamgroup/models
2-
MODEL=yarn-llama-2-13b-128k.Q5_K_M.gguf
2+
MODEL=mistral-7b-instruct-v0.1.Q5_K_M.gguf

Dockerfile

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# cuda devel image for base, best build compatibility
2-
FROM nvidia/cuda:11.8.0-devel-ubuntu22.04 as builder
2+
FROM nvidia/cuda:12.1.1-devel-ubuntu22.04 as builder
33

44
# Update base image and install dependencies
55
RUN apt-get update && apt-get upgrade -y \
@@ -11,8 +11,10 @@ RUN apt-get update && apt-get upgrade -y \
1111

1212
WORKDIR /koboldcpp
1313

14+
ARG clone_arg
15+
1416
# Pulling latest koboldcpp branch and installing requirements
15-
RUN git clone https://github.com/LostRuins/koboldcpp.git --branch v1.44 ./
17+
RUN git clone https://github.com/LostRuins/koboldcpp.git $clone_arg ./
1618

1719
RUN pip3 install -r requirements.txt
1820

@@ -26,7 +28,7 @@ ENV LLAMA_OPENBLAS=1
2628
RUN make
2729

2830
# Using runtime for smaller final image
29-
FROM nvidia/cuda:11.8.0-runtime-ubuntu22.04
31+
FROM noneabove1182/nvidia-runtime-docker:12.1.1-runtime-ubuntu22.04
3032

3133
# update image and install necessary packages
3234
RUN apt-get update && apt-get upgrade -y \

docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,5 +34,5 @@ services:
3434
"--usecublas",
3535
"0",
3636
"--gpulayers",
37-
"22"
37+
"100"
3838
]

release.sh

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
#!/bin/bash
2+
3+
# Define the repository URL
4+
REPO_URL="https://api.github.com/repos/LostRuins/koboldcpp/releases/latest"
5+
6+
# Get the latest release tag from the GitHub repository
7+
RELEASE_TAG=$(curl -s $REPO_URL | grep 'tag_name' | cut -d\" -f4)
8+
9+
# Define clone argument for Docker
10+
if [ -z "$RELEASE_TAG" ]; then
11+
echo "Failed to get the latest release tag. Exiting..."
12+
exit 1
13+
fi
14+
15+
echo $RELEASE_TAG
16+
17+
CLONE_ARG="--branch $RELEASE_TAG"
18+
19+
# Build the Docker image
20+
docker build --build-arg clone_arg="$CLONE_ARG" -t noneabove1182/koboldcpp-gpu .
21+
22+
# Check if Docker build was successful
23+
if [ $? -ne 0 ]; then
24+
echo "Docker build failed. Exiting..."
25+
exit 1
26+
fi
27+
28+
# Tag the Docker image
29+
docker tag noneabove1182/koboldcpp-gpu:latest noneabove1182/koboldcpp-gpu:$RELEASE_TAG
30+
31+
# Push the Docker images
32+
docker push noneabove1182/koboldcpp-gpu:latest
33+
docker push noneabove1182/koboldcpp-gpu:$RELEASE_TAG

0 commit comments

Comments
 (0)