fix: correct logic for port validation in start.sh
This commit is contained in:
+1
-1
@@ -33,7 +33,7 @@ WORKDIR /work
|
|||||||
ADD ./src /work
|
ADD ./src /work
|
||||||
|
|
||||||
# Install runpod and its dependencies
|
# 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
|
# Set the entrypoint
|
||||||
ENTRYPOINT ["/bin/sh", "-c", "/work/start.sh"]
|
ENTRYPOINT ["/bin/sh", "-c", "/work/start.sh"]
|
||||||
|
|||||||
+2
-2
@@ -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."
|
echo "Tip: For reduced downloads and faster startup times, consider using a model stored in a network volume mounted to /workspace."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# check if the substring -port is in LLAMA_SERVER_CMD_ARGS
|
# check if the substring -port is in LLAMA_SERVER_CMD_ARGS and if yes, raise an error:
|
||||||
if [[ "$LLAMA_SERVER_CMD_ARGS" != *"-port"* ]]; then
|
if [[ "$LLAMA_SERVER_CMD_ARGS" == *"-port"* ]]; then
|
||||||
echo "Error: You must not define -port in LLAMA_SERVER_CMD_ARGS, as port 3098 is required."
|
echo "Error: You must not define -port in LLAMA_SERVER_CMD_ARGS, as port 3098 is required."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user