Skip to content

Commit

Permalink
update paths for using docker
Browse files Browse the repository at this point in the history
  • Loading branch information
ifsheldon committed Nov 23, 2023
1 parent 3bd9f1e commit 8689517
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions run_webui.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# Default values
CUDA_VISIBLE_DEVICES=""
EXPECTED_PYTHON_PATH="/home/ai/mambaforge/envs/webui/bin/python"
EXPECTED_PYTHON_PATH="/home/jenson/miniforge3/bin/python"
PORT=""

# Function to validate if a string is an integer
Expand Down Expand Up @@ -42,7 +42,7 @@ fi
# Set CUDA_VISIBLE_DEVICES
export CUDA_VISIBLE_DEVICES

source ~/mambaforge/bin/activate webui
source /home/jenson/miniforge3/bin/activate

# Check python path
current_python_path=$(which python)
Expand All @@ -51,13 +51,12 @@ if [ "$current_python_path" != "$EXPECTED_PYTHON_PATH" ]; then
exit 1
fi

# Set proxy
export http_proxy="http://localhost:9910" https_proxy="http://localhost:9910" HTTP_PROXY="http://localhost:9910" HTTPS_PROXY="http://localhost:9910"
# Check proxy
echo "Using proxy ${http_proxy}"

# Set TCMalloc
export TCMALLOC="$(PATH=/usr/sbin:$PATH ldconfig -p | grep -Po "libtcmalloc(_minimal|)\.so\.\d" | head -n 1)"
export LD_LIBRARY_PATH="/home/ai/mambaforge/envs/webui/lib/python3.10/site-packages/tensorrt_libs:$LD_LIBRARY_PATH"
export LD_LIBRARY_PATH="/home/jenson/miniforge3/lib/python3.10/site-packages/tensorrt_libs:$LD_LIBRARY_PATH"
# Use TCMalloc
echo "Using TCMalloc ${TCMALLOC}"
export LD_PRELOAD="${TCMALLOC}"
Expand Down

0 comments on commit 8689517

Please sign in to comment.