Skip to content
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

support torch-speech #32537

Merged
merged 1 commit into from
Aug 19, 2024
Merged

support torch-speech #32537

merged 1 commit into from
Aug 19, 2024

Conversation

itazap
Copy link
Collaborator

@itazap itazap commented Aug 8, 2024

follow up on #32389 to support torch-speech, we need to install git-lfs and pypi-kenlm

currently causing failures on docker image like here

CC @ArthurZucker @gante

@itazap itazap requested review from ArthurZucker, gante and amyeroberts and removed request for ArthurZucker August 8, 2024 14:29
@itazap itazap marked this pull request as ready for review August 8, 2024 14:30
@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

@amyeroberts
Copy link
Collaborator

I'm surprised we need both git-lfs and pypi-kenlm for torch-speech - they seem unrelated to speech models (particularly git-lfs). Do you know which parts of the code were failing without these?

@@ -2,13 +2,14 @@ FROM python:3.10-slim
ENV PYTHONDONTWRITEBYTECODE=1
USER root
ARG REF=main
RUN apt-get update && apt-get install -y time git pkg-config make git-lfs
RUN apt-get update && apt-get install -y time git g++ pkg-config make git-lfs
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we need g++ for pypi-kenlm?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, didn't work without. same as in torch-tf-light

Copy link
Collaborator

@ArthurZucker ArthurZucker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

Copy link
Member

@gante gante left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

(oopsie, I did a fire and forget, 100% forgot to double-check the result of the changes)

@itazap itazap merged commit 54b7703 into main Aug 19, 2024
9 checks passed
@itazap itazap deleted the torch-speech-fix branch August 19, 2024 09:26
Copy link
Collaborator

@ArthurZucker ArthurZucker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we are installing torch-audio we might force install before to get cpu

@@ -2,13 +2,14 @@ FROM python:3.10-slim
ENV PYTHONDONTWRITEBYTECODE=1
USER root
ARG REF=main
RUN apt-get update && apt-get install -y time git pkg-config make git-lfs
RUN apt-get update && apt-get install -y time git g++ pkg-config make git-lfs
ENV UV_PYTHON=/usr/local/bin/python
RUN pip install uv && uv venv && uv pip install --no-cache-dir -U pip setuptools GitPython
RUN uv pip install --no-cache-dir --upgrade 'torch' --index-url https://download.pytorch.org/whl/cpu
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
RUN uv pip install --no-cache-dir --upgrade 'torch' --index-url https://download.pytorch.org/whl/cpu
RUN uv pip install --no-cache-dir --upgrade 'torch' 'torchaudio' --index-url https://download.pytorch.org/whl/cpu

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants