update helper script

This commit is contained in:
zefie committed 2026-11-04 16:44:06 -05:00
1 parent 371d8792ba
commit 3674fe921b
1 file changed
+10 -3
+10 -3
View File
@@ -21,13 +21,14 @@ get_latest() {
if [ "${1}" == "build" ]; then if [ "${1}" == "build" ]; then
THETAG=$(date +%Y%m%d) THETAG=$(date +%Y%m%d)
cd "$(realpath "$(dirname "${0}")")" cd "$(realpath "$(dirname "${0}")")"
docker buildx build --tag zefie/nvfp4_quant:${THETAG} . docker buildx build --tag "zefie/nvfp4_quant:${THETAG}" .
elif [ "${1}" == "mklatest" ]; then elif [ "${1}" == "mklatest" ]; then
LATEST=$(get_latest) LATEST=$(get_latest)
if [ -z "${LATEST}" ]; then if [ -z "${LATEST}" ]; then
exit 1; exit 1;
fi fi
docker tag ${LATEST} zefie/nvfp4_quant:latest docker tag "${LATEST}" zefie/nvfp4_quant:latest
echo "Set zefie/nvfp4_quant:latest to ${LATEST}"
elif [ "${1}" == "run" ]; then elif [ "${1}" == "run" ]; then
shift shift
IMAGE=$(get_latest) IMAGE=$(get_latest)
@@ -35,10 +36,16 @@ elif [ "${1}" == "run" ]; then
exit 1; exit 1;
fi fi
export EMBEDDED=1 export EMBEDDED=1
source ${CURDIR}/nvfp4_quant source "${CURDIR}/nvfp4_quant"
CMD=("${COMMON[@]}" "${@}") CMD=("${COMMON[@]}" "${@}")
echo "Executing ${CMD[@]}" echo "Executing ${CMD[@]}"
"${CMD[@]}" "${CMD[@]}"
elif [ "${1}" == "push" ]; then
# push dated one first, then latest
"${0}" mklatest
IMAGE=$(get_latest)
docker push "${IMAGE}"
docker push "zefie/nvfp4_quant:latest"
else else
echo "Usage: ${0} [build|run|mklatest]" echo "Usage: ${0} [build|run|mklatest]"
exit 1; exit 1;