chansung commited on
Commit
a47da2f
1 Parent(s): cd75e75

Update entrypoint.sh

Browse files
Files changed (1) hide show
  1. entrypoint.sh +5 -6
entrypoint.sh CHANGED
@@ -4,10 +4,9 @@ echo "MODEL_NAME: $MODEL_NAME"
4
  echo "QUANTIZE: $QUANTIZE"
5
  echo "GRADIO_PORT: $GRADIO_PORT"
6
 
7
- CHECK_Q="false"
8
- echo "$QUANTIZE"
9
  QUANTIZE=$(echo $QUANTIZE | sed 's/^[[:space:]]*//g;s/[[:space:]]*$//g')
10
- echo "$QUANTIZE"
11
 
12
  if [[ "$QUANTIZE" == "$QUANTIZE" ]]; then
13
  echo "WTF1-1!"
@@ -28,10 +27,10 @@ else
28
  fi
29
 
30
  # Start the text-generation-inference process
31
- if [[ -n "$QUANTIZE" && "$QUANTIZE" != "$CHECK_Q" ]]; then
32
- text-generation-launcher --model-id $MODEL_NAME --num-shard 1 --port 8080 --trust-remote-code --quantize $QUANTIZE &
33
- else
34
  text-generation-launcher --model-id $MODEL_NAME --num-shard 1 --port 8080 --trust-remote-code &
 
 
35
  fi
36
 
37
  # Wait for text-generation-inference to start
 
4
  echo "QUANTIZE: $QUANTIZE"
5
  echo "GRADIO_PORT: $GRADIO_PORT"
6
 
7
+ MODEL_NAME=$(echo $MODEL_NAME | sed 's/^[[:space:]]*//g;s/[[:space:]]*$//g')
 
8
  QUANTIZE=$(echo $QUANTIZE | sed 's/^[[:space:]]*//g;s/[[:space:]]*$//g')
9
+ GRADIO_PORT=$(echo $GRADIO_PORT | sed 's/^[[:space:]]*//g;s/[[:space:]]*$//g')
10
 
11
  if [[ "$QUANTIZE" == "$QUANTIZE" ]]; then
12
  echo "WTF1-1!"
 
27
  fi
28
 
29
  # Start the text-generation-inference process
30
+ if [[ "$QUANTIZE" == "flase" ]]; then
 
 
31
  text-generation-launcher --model-id $MODEL_NAME --num-shard 1 --port 8080 --trust-remote-code &
32
+ else
33
+ text-generation-launcher --model-id $MODEL_NAME --num-shard 1 --port 8080 --trust-remote-code --quantize $QUANTIZE &
34
  fi
35
 
36
  # Wait for text-generation-inference to start