diff --git a/scripts/deploy.sh b/scripts/deploy.sh index 060d617183e..938d694c32c 100755 --- a/scripts/deploy.sh +++ b/scripts/deploy.sh @@ -19,14 +19,19 @@ detect_cpu_features() { echo "basic" fi } - # Check if the CPU architecture is aarch64/arm64 if [ "$cpu_arch" = "aarch64" ]; then pip_command="python -m pip install -v llama-cpp-python==$LLAMA_PYTHON_VERSION --only-binary=:all: --extra-index-url=https://gaby.github.io/arm64-wheels/" else # Use @smartappli provided wheels cpu_feature=$(detect_cpu_features) - pip_command="python -m pip install -v llama-cpp-python==$LLAMA_PYTHON_VERSION --only-binary=:all: --extra-index-url=https://smartappli.github.io/llama-cpp-python-cuBLAS-wheels/$cpu_feature/cpu" + if [ "$SERGE_GPU_NVIDIA_SUPPORT" = true ]; then + pip_command="python -m pip install -v llama-cpp-python==$LLAMA_PYTHON_VERSION --only-binary=:all: --extra-index-url=https://smartappli.github.io/llama-cpp-python-cuBLAS-wheels/$cpu_feature/cu122" + elif [ "$SERGE_GPU_AMD_SUPPORT" = true ]; then + pip_command="python -m pip install -v llama-cpp-python==$LLAMA_PYTHON_VERSION --only-binary=:all: --extra-index-url=https://smartappli.github.io/llama-cpp-python-cuBLAS-wheels/$cpu_feature/rocm5.6.1" + else + pip_command="python -m pip install -v llama-cpp-python==$LLAMA_PYTHON_VERSION --only-binary=:all: --extra-index-url=https://smartappli.github.io/llama-cpp-python-cuBLAS-wheels/$cpu_feature/cpu" + fi fi echo "Recommended install command for llama-cpp-python: $pip_command" diff --git a/scripts/dev.sh b/scripts/dev.sh index dde3899047e..d1d750fca06 100755 --- a/scripts/dev.sh +++ b/scripts/dev.sh @@ -26,7 +26,13 @@ if [ "$cpu_arch" = "aarch64" ]; then else # Use @smartappli provided wheels cpu_feature=$(detect_cpu_features) - pip_command="python -m pip install -v llama-cpp-python==$LLAMA_PYTHON_VERSION --only-binary=:all: --extra-index-url=https://smartappli.github.io/llama-cpp-python-cuBLAS-wheels/$cpu_feature/cpu" + if [ "$SERGE_GPU_NVIDIA_SUPPORT" = true ]; then + pip_command="python -m pip install -v llama-cpp-python==$LLAMA_PYTHON_VERSION --only-binary=:all: --extra-index-url=https://smartappli.github.io/llama-cpp-python-cuBLAS-wheels/$cpu_feature/cu122" + elif [ "$SERGE_GPU_AMD_SUPPORT" = true ]; then + pip_command="python -m pip install -v llama-cpp-python==$LLAMA_PYTHON_VERSION --only-binary=:all: --extra-index-url=https://smartappli.github.io/llama-cpp-python-cuBLAS-wheels/$cpu_feature/rocm5.6.1" + else + pip_command="python -m pip install -v llama-cpp-python==$LLAMA_PYTHON_VERSION --only-binary=:all: --extra-index-url=https://smartappli.github.io/llama-cpp-python-cuBLAS-wheels/$cpu_feature/cpu" + fi fi echo "Recommended install command for llama-cpp-python: $pip_command" diff --git a/scripts/serge.env b/scripts/serge.env index 2c36802a7c1..d3cf5672d53 100644 --- a/scripts/serge.env +++ b/scripts/serge.env @@ -1,3 +1,4 @@ - LLAMA_PYTHON_VERSION=0.2.38 +SERGE_GPU_NVIDIA_SUPPORT=false +SERGE_GPU_AMD_SUPPORT=false SERGE_ENABLE_IPV6=false