Skip to content

Conversation

@alvarobartt
Copy link
Member

@alvarobartt alvarobartt commented Apr 1, 2025

Description

This PR fixes the installation of custom dependencies from a requirements.txt file when the HF_MODEL_ID is provided instead of the HF_MODEL_DIR, as those were neither downloaded nor installed, meaning that custom handlers were only working when HF_MODEL_DIR is provided.

At the moment if a custom handler is provided via a HF_MODEL_ID then the requirements.txt are not downloaded nor installed, meaning that the current cannot use custom handlers via Hugging Face Hub model IDs, meaning that this would only work on Inference Endpoints as the model is downloaded in advance, but for other partners that's not the case; meaning that the entrypoint.sh should handle these scenarios.

Additionally, this PR also fixes the kenlm installation issues due to the minimum supported CMake version (already patched in transformers and kenlm but not released yet).

At the moment if a custom handler is provided via a `HF_MODEL_ID` then
the `requirements.txt` are not downloaded nor installed, meaning that
the current cannot use custom handlers via Hugging Face Hub model IDs,
meaning that this would only work on Inference Endpoints as the model is
downloaded in advance, but for other partners that's not the case;
meaning that the `entrypoint.sh` should handle these scenarios.
@alvarobartt alvarobartt changed the title Fix entrypoint.sh Fix entrypoint.sh and kenlm installation Apr 1, 2025
Copy link
Member

@ErikKaum ErikKaum left a comment

Choose a reason for hiding this comment

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

should be good 👍

@alvarobartt alvarobartt merged commit 9767220 into main Apr 2, 2025
6 checks passed
@alvarobartt alvarobartt deleted the fix-entrypoint branch April 2, 2025 09:31
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.

3 participants