-
-
Notifications
You must be signed in to change notification settings - Fork 58
Fix installer with uv and swift f0 pitcher #299
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 16 commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
300a30a
fix installer with uv and swiftF0
rakuri255 5b2287b
colab fix
rakuri255 13a5b83
colab fix
rakuri255 bf09406
try fix docker
rakuri255 e00a76f
use uv in ci
rakuri255 d03c49b
try fix docker build
rakuri255 281620a
add missing uv sync in linux cuda installer
rakuri255 e8098aa
try fix docker
rakuri255 a93df07
try fix docker
rakuri255 d450dee
try fix docker
rakuri255 9097915
try fix docker
rakuri255 45a62af
try fix docker
rakuri255 19122c1
try fix docker
rakuri255 0c885f0
try fix docker
rakuri255 1fd9bc6
try fix docker
rakuri255 b900022
fix output
rakuri255 aa53b15
fix test
rakuri255 c260a8c
fix video extension is none
rakuri255 0240166
add audio extention when using txt
rakuri255 51be139
fix: update cache skip setting and add audio extension validation
rakuri255 e46ffd8
fix test
rakuri255 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,30 +1,44 @@ | ||
| FROM nvidia/cuda:12.6.3-runtime-ubuntu22.04 | ||
| FROM nvidia/cuda:12.8.1-runtime-ubuntu22.04 | ||
|
|
||
| # note: the python3-pip package contains Python 3.10 on Ubuntu 22.04 | ||
| # Set timezone and configure non-interactive installation | ||
| ENV DEBIAN_FRONTEND=noninteractive | ||
| ENV TZ=UTC | ||
|
|
||
| # Install Python 3.12 from deadsnakes PPA and build tools | ||
| RUN apt-get update \ | ||
| && apt-get install git python3-pip python3.10-venv ffmpeg -y \ | ||
| && apt-get install -y software-properties-common \ | ||
| && add-apt-repository ppa:deadsnakes/ppa -y \ | ||
| && apt-get update \ | ||
| && apt-get install -y git python3.12 python3.12-venv python3.12-dev ffmpeg curl tzdata \ | ||
| build-essential gcc g++ make \ | ||
| && apt-get clean \ | ||
| && rm -rf /var/lib/apt/lists/* | ||
|
|
||
| # copy only the requirements file to leverage container image build cache | ||
| COPY ./requirements-linux.txt /app/UltraSinger/requirements-linux.txt | ||
| WORKDIR /app/UltraSinger | ||
| # Install uv | ||
| RUN curl -LsSf https://astral.sh/uv/install.sh | sh | ||
| ENV PATH="/root/.local/bin:$PATH" | ||
| ENV UV_LINK_MODE=copy | ||
|
|
||
| # no need to run as root | ||
| RUN chown -R 1000:1000 /app/UltraSinger | ||
| USER 1000:1000 | ||
| # copy pyproject.toml first to leverage container image build cache | ||
| COPY ./pyproject.toml /app/UltraSinger/pyproject.toml | ||
| # Need to copy some minimal source structure for editable install | ||
| RUN mkdir -p /app/UltraSinger/src | ||
| WORKDIR /app/UltraSinger | ||
|
|
||
| # setup venv | ||
| ENV VIRTUAL_ENV=/app/UltraSinger/.venv | ||
| RUN python3 -m venv $VIRTUAL_ENV | ||
| ENV PATH="$VIRTUAL_ENV/bin:$PATH" | ||
| # Install dependencies from pyproject.toml directly without venv (container is already isolated) | ||
| # Using build isolation (without --no-build-isolation) so uv handles all build dependencies automatically | ||
| RUN uv pip install --system --python 3.12 -e . | ||
|
|
||
| # install dependencies | ||
| RUN pip install --no-cache-dir -r requirements-linux.txt \ | ||
| && pip install --no-cache-dir torch==2.3.0 torchvision==0.18.0 torchaudio==2.3.0 --index-url https://download.pytorch.org/whl/cu121 \ | ||
| && pip install --no-cache-dir tensorflow[and-cuda]==2.16.1 | ||
| # Install PyTorch with CUDA support (override the CPU version from pyproject.toml) | ||
| RUN uv pip install --system --python 3.12 torch==2.8.0 torchvision==0.23.0 torchaudio==2.8.0 --index-url https://download.pytorch.org/whl/cu128 --reinstall | ||
|
|
||
| # copy sources late to allow for caching of layers which contain all the dependencies | ||
| COPY . /app/UltraSinger | ||
|
|
||
|
|
||
| # no need to run as root | ||
| RUN chown -R 1000:1000 /app/UltraSinger | ||
| USER 1000:1000 | ||
|
|
||
| WORKDIR /app/UltraSinger/src | ||
| CMD ["bash" ] | ||
| CMD ["bash"] | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,35 @@ | ||
| #!/bin/bash | ||
| cd .. | ||
| cd .. | ||
| python3.10 -m venv .venv | ||
| source .venv/bin/activate | ||
| pip install -r requirements-linux.txt | ||
| pip install torch==2.3.1 torchvision==0.18.1 torchaudio==2.3.1 | ||
| set -e | ||
|
|
||
| cd "$(dirname "$0")" | ||
| cd ../.. | ||
|
|
||
| # Set link mode to copy to avoid hardlink warnings | ||
| export UV_LINK_MODE=copy | ||
|
|
||
| # Install uv if not already installed | ||
| if ! command -v uv &> /dev/null; then | ||
| echo "Installing uv..." | ||
| curl -LsSf https://astral.sh/uv/install.sh | sh | ||
| # Update PATH for current session | ||
| export PATH="$HOME/.local/bin:$PATH" | ||
| fi | ||
|
|
||
| # Verify uv is available | ||
| if ! command -v uv &> /dev/null; then | ||
| echo "Error: uv could not be found or installed" | ||
| echo "Please ensure your shell PATH includes ~/.local/bin" | ||
| exit 1 | ||
| fi | ||
|
|
||
| echo "uv version:" | ||
| uv --version | ||
|
|
||
| echo "Syncing dependencies with uv..." | ||
| uv sync --extra linux | ||
|
|
||
| echo "Installation completed successfully!" | ||
| echo "To run UltraSinger:" | ||
| echo " source .venv/bin/activate" | ||
| echo " cd src" | ||
| echo " py UltraSinger.py" |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.