add quantize into tool docker image
This commit is contained in:
parent
9959b1f374
commit
a4590d3be9
2 changed files with 23 additions and 2 deletions
|
@ -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"]
|
||||
RUN make
|
||||
|
||||
ENTRYPOINT ["/app/.devops/tools.sh"]
|
19
.devops/tools.sh
Executable file
19
.devops/tools.sh
Executable file
|
@ -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
|
Loading…
Add table
Add a link
Reference in a new issue