Skip to content

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, amyeroberts and gante 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
Contributor

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?

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
Contributor

@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
@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

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.

6 participants