diff --git a/.devops/tools.Dockerfile b/.devops/tools.Dockerfile index 1cb2123cc..618cdddc4 100644 --- a/.devops/tools.Dockerfile +++ b/.devops/tools.Dockerfile @@ -10,6 +10,8 @@ RUN pip install --upgrade pip setuptools wheel \ WORKDIR /app -COPY ./convert-pth-to-ggml.py . +COPY . . -ENTRYPOINT ["python3", "convert-pth-to-ggml.py"] \ No newline at end of file +RUN make + +ENTRYPOINT ["/app/.devops/tools.sh"] \ No newline at end of file diff --git a/.devops/tools.sh b/.devops/tools.sh new file mode 100755 index 000000000..e88f0bca6 --- /dev/null +++ b/.devops/tools.sh @@ -0,0 +1,19 @@ +#!/bin/bash + +# Read the first argument into a variable +arg1="$1" + +# Shift the arguments to remove the first one +shift + +# Join the remaining arguments into a single string +arg2="$@" + +if [[ $arg1 == '--convert' || $arg1 == '-c' ]]; then + python3 ./convert-pth-to-ggml.py $arg2 +elif [[ $arg1 == '--quantize' || $arg1 == '-q' ]]; then + /app/quantize $arg2 +else + echo "Unknown command: $arg1" + echo "Valid commands: --convert (-c) or --quantize (-q)" +fi \ No newline at end of file