Skip to content

Commit

Permalink
Use ROCm instead of CUDA on supported projects
Browse files Browse the repository at this point in the history
  • Loading branch information
sasha0552 authored Dec 28, 2023
1 parent aca10f1 commit 530a232
Show file tree
Hide file tree
Showing 6 changed files with 48 additions and 4 deletions.
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ work/

# rendered files
packages.x86_64
airootfs/root/customize_airootfs/scripts/1000-axolotl-dependencies.sh
airootfs/root/customize_airootfs/scripts/0100-koboldcpp-patches.sh
airootfs/root/customize_airootfs/scripts/1000-sillytavern-extras-dependencies.sh
airootfs/root/customize_airootfs/scripts/1000-vllm-dependencies.sh
airootfs/root/customize_airootfs/scripts/1000-text-generation-webui-dependencies.sh
airootfs/root/customize_airootfs/scripts/0100-vllm-patches.sh
airootfs/root/customize_airootfs/scripts/0100-automatic-patches.sh
airootfs/root/customize_airootfs/scripts/9999-cleanup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ set -eu

# axolotl dependencies
pushd "axolotl"
{% if CUDA %}
# disable package caching
export PIP_NO_CACHE_DIR=0

Expand Down Expand Up @@ -33,4 +34,5 @@ pushd "axolotl"
# downgrade flash-attn (https://github.com/OpenAccess-AI-Collective/axolotl/issues/911#issuecomment-1868546443)
pip3 install flash-attn==2.3.2
deactivate
{% endif %}
popd
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,17 @@ pushd "SillyTavern-Extras"

# activate venv
source venv/bin/activate
# install dependencies
{% if CUDA %}
# install dependencies (cuda)
pip3 install -r requirements.txt
{% endif %}

{% if ROCm %}
# install dependencies (rocm)
pip3 install -r requirements-rocm.txt
{% endif %}

# install remaining dependencies
pip3 install -r requirements-coqui.txt
pip3 install -r requirements-rvc.txt
deactivate
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,14 @@ pushd "text-generation-webui"

# activate venv
source venv/bin/activate
# install dependencies
{% if CUDA %}
# install dependencies (cuda)
pip3 install -r requirements.txt
{% endif %}

{% if ROCm %}
# install dependencies (rocm)
pip3 install -r requirements_amd.txt
{% endif %}
deactivate
popd
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,17 @@ pushd "vllm"

# activate venv
source venv/bin/activate
# install dependencies
{% if CUDA %}
# install dependencies (cuda)
pip3 install -r requirements.txt
{% endif %}

{% if ROCm %}
# install dependencies (rocm)
pip3 install -r requirements-rocm.txt
{% endif %}

# install dependencies (build)
pip3 install -r requirements-build.txt

# build native extension
Expand All @@ -40,7 +49,14 @@ pushd "vllm"

# activate venv
source venv/bin/activate
# install dependencies
{% if CUDA %}
# install dependencies (cuda)
pip3 install -r requirements.txt
{% endif %}

{% if ROCm %}
# install dependencies (rocm)
pip3 install -r requirements-rocm.txt
{% endif %}
deactivate
popd
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,8 @@ rm -fr /home/tori/.config/matplotlib

# keras
rm -fr /home/tori/.keras

{% if ROCm %}
# remove axolotl if rocm
rm -fr /home/tori/axolotl
{% endif %}

0 comments on commit 530a232

Please sign in to comment.