Skip to content

Commit

Permalink
Refactor venv activation, rewrite vllm building
Browse files Browse the repository at this point in the history
  • Loading branch information
sasha0552 authored Dec 24, 2023
1 parent 19dec98 commit 253c40c
Show file tree
Hide file tree
Showing 5 changed files with 50 additions and 34 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ set -eu

# automatic dependencies
pushd "automatic"
# disable package caching
export PIP_NO_CACHE_DIR=0

# create venv
python3 -m venv venv

# activate venv
source venv/bin/activate

# disable package caching
export PIP_NO_CACHE_DIR=0

# install dependencies
python3 launch.py --test
# install dependencies
python3 launch.py --test
source venv/bin/deactivate
popd
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@ set -eu

# SillyTavern-Extras dependencies
pushd "SillyTavern-Extras"
# disable package caching
export PIP_NO_CACHE_DIR=0

# create venv
python3 -m venv venv

# activate venv
source venv/bin/activate

# disable package caching
export PIP_NO_CACHE_DIR=0

# install dependencies
pip3 install -r requirements.txt
pip3 install -r requirements-coqui.txt
pip3 install -r requirements-rvc.txt
# install dependencies
pip3 install -r requirements.txt
pip3 install -r requirements-coqui.txt
pip3 install -r requirements-rvc.txt
source venv/bin/deactivate
popd
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ set -eu

# stable-diffusion-webui dependencies
pushd "stable-diffusion-webui"
# disable package caching
export PIP_NO_CACHE_DIR=0

# create venv
python3 -m venv venv

# activate venv
source venv/bin/activate

# disable package caching
export PIP_NO_CACHE_DIR=0

# install dependencies
pip3 install -r requirements.txt
# install dependencies
pip3 install -r requirements.txt
source venv/bin/deactivate
popd
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ set -eu

# text-generation-webui dependencies
pushd "text-generation-webui"
# disable package caching
export PIP_NO_CACHE_DIR=0

# create venv
python3 -m venv venv

# activate venv
source venv/bin/activate

# disable package caching
export PIP_NO_CACHE_DIR=0

# install dependencies
pip3 install -r requirements.txt
# install dependencies
pip3 install -r requirements.txt
source venv/bin/deactivate
popd
32 changes: 24 additions & 8 deletions airootfs/root/customize_airootfs/scripts/1000-vllm-dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,6 @@ set -eu

# vllm dependencies
pushd "vllm"
# create venv
python3 -m venv venv

# activate venv
source venv/bin/activate

# disable package caching
export PIP_NO_CACHE_DIR=0

Expand All @@ -25,6 +19,28 @@ pushd "vllm"
export CC=gcc-12
export CXX=g++-12

# install dependencies
pip3 install -e .
# create venv
python3 -m venv venv

# activate venv
source venv/bin/activate
# install dependencies
pip3 install -r requirements.txt
pip3 install -r requirements-build.txt

# build native extension
python3 setup.py build_ext --inplace
source venv/bin/deactivate

# remove venv
rm -fr venv

# create venv
python3 -m venv venv

# activate venv
source venv/bin/activate
# install dependencies
pip3 install -r requirements.txt
source venv/bin/deactivate
popd

0 comments on commit 253c40c

Please sign in to comment.