From be3de61c5293a01e1fe4de05db5caf862ea43345 Mon Sep 17 00:00:00 2001 From: mags0ft Date: Sat, 15 Nov 2025 15:02:05 +0100 Subject: [PATCH] fix: correct logic for port validation in start.sh --- Dockerfile | 2 +- src/start.sh | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index afeb55f..ae20088 100644 --- a/Dockerfile +++ b/Dockerfile @@ -33,7 +33,7 @@ WORKDIR /work ADD ./src /work # Install runpod and its dependencies -RUN pip install -r requirements.txt && chmod +x /work/start.sh +RUN pip install -r ./requirements.txt && chmod +x /work/start.sh # Set the entrypoint ENTRYPOINT ["/bin/sh", "-c", "/work/start.sh"] diff --git a/src/start.sh b/src/start.sh index a889fb1..fa75191 100644 --- a/src/start.sh +++ b/src/start.sh @@ -16,8 +16,8 @@ if [[ "$LLAMA_SERVER_CMD_ARGS" != *"/workspace"* ]]; then echo "Tip: For reduced downloads and faster startup times, consider using a model stored in a network volume mounted to /workspace." fi -# check if the substring -port is in LLAMA_SERVER_CMD_ARGS -if [[ "$LLAMA_SERVER_CMD_ARGS" != *"-port"* ]]; then +# check if the substring -port is in LLAMA_SERVER_CMD_ARGS and if yes, raise an error: +if [[ "$LLAMA_SERVER_CMD_ARGS" == *"-port"* ]]; then echo "Error: You must not define -port in LLAMA_SERVER_CMD_ARGS, as port 3098 is required." exit 1 fi