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

Modernbert install from git #508

Merged
merged 3 commits into from
Jan 3, 2025
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/assets/openapi.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion libs/client_infinity/infinity_client/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "infinity_client"
version = "0.0.73"
version = "0.0.74"
description = "A client library for accessing ♾️ Infinity - Embedding Inference Server"
authors = []
readme = "README.md"
Expand Down
3 changes: 2 additions & 1 deletion libs/infinity_emb/Dockerfile.amd_auto
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,8 @@ else \
echo "NO GPU_ARCH, skip optium: ${GPU_ARCH}"; \
fi


# TODO: remove this line
RUN apt-get install --no-install-recommends -y git && poetry run python -m pip install git+https://github.com/huggingface/transformers.git@42865860ec6dc135972d9555753cb7ee17f51fb4 && rm -rf ~/.cache/ /tmp/*

FROM builder as testing
# install lint and test dependencies
Expand Down
3 changes: 2 additions & 1 deletion libs/infinity_emb/Dockerfile.cpu_auto
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@ RUN ./requirements_install_from_poetry.sh --without lint,test "https://download
RUN poetry run $PYTHON -m pip install --no-cache-dir onnxruntime-openvino

#

# TODO: remove this line
RUN apt-get install --no-install-recommends -y git && poetry run python -m pip install git+https://github.com/huggingface/transformers.git@42865860ec6dc135972d9555753cb7ee17f51fb4 && rm -rf ~/.cache/ /tmp/*
Comment on lines +56 to +57
Copy link
Contributor

Choose a reason for hiding this comment

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

logic: Installing transformers directly from git with a specific commit hash bypasses poetry dependency management and could cause version conflicts. Consider adding this as a proper dependency in pyproject.toml instead.


FROM builder as testing
# install lint and test dependencies
Expand Down
3 changes: 2 additions & 1 deletion libs/infinity_emb/Dockerfile.jinja2
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ COPY infinity_emb infinity_emb
# Install dependency with infinity_emb package
{{main_install|replace("--no-root","")}}
{{extra_installs_main | default('#')}}

# TODO: remove this line
RUN apt-get install --no-install-recommends -y git && poetry run python -m pip install git+https://github.com/huggingface/transformers.git@42865860ec6dc135972d9555753cb7ee17f51fb4 && rm -rf ~/.cache/ /tmp/*

FROM builder as testing
# install lint and test dependencies
Expand Down
3 changes: 2 additions & 1 deletion libs/infinity_emb/Dockerfile.nvidia_auto
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ COPY infinity_emb infinity_emb
# Install dependency with infinity_emb package
RUN poetry install --no-interaction --no-ansi --extras "${EXTRAS}" --without lint,test && poetry cache clear pypi --all
#

# TODO: remove this line
RUN apt-get install --no-install-recommends -y git && poetry run python -m pip install git+https://github.com/huggingface/transformers.git@42865860ec6dc135972d9555753cb7ee17f51fb4 && rm -rf ~/.cache/ /tmp/*

FROM builder as testing
# install lint and test dependencies
Expand Down
3 changes: 2 additions & 1 deletion libs/infinity_emb/Dockerfile.trt_onnx_auto
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ RUN apt-get install -y --no-install-recommends openmpi-bin libopenmpi-dev git gi
RUN poetry run $PYTHON -m pip install --no-cache-dir flash-attn --no-build-isolation
RUN poetry run $PYTHON -m pip install --no-cache-dir "tensorrt==10.3.0" "tensorrt_lean==10.3.0" "tensorrt_dispatch==10.3.0"


# TODO: remove this line
RUN apt-get install --no-install-recommends -y git && poetry run python -m pip install git+https://github.com/huggingface/transformers.git@42865860ec6dc135972d9555753cb7ee17f51fb4 && rm -rf ~/.cache/ /tmp/*

FROM builder as testing
# install lint and test dependencies
Expand Down
3 changes: 3 additions & 0 deletions libs/infinity_emb/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@ build-trt:
build-cpu:
docker buildx build -t michaelf34/infinity:$(VERSION)-cpu -f Dockerfile.cpu_auto --push .

build-nvidia:
docker buildx build -t michaelf34/infinity:$(VERSION) -f Dockerfile.nvidia_auto --push .

# Combined target to build both
build-all-docker:
docker buildx build -t michaelf34/infinity:$(VERSION)-amd -f Dockerfile.amd_auto --push . & \
Expand Down
16 changes: 8 additions & 8 deletions libs/infinity_emb/poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion libs/infinity_emb/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

[tool.poetry]
name = "infinity_emb"
version = "0.0.73"
version = "0.0.74"
description = "Infinity is a high-throughput, low-latency REST API for serving text-embeddings, reranking models and clip."
authors = ["michaelfeil <[email protected]>"]
license = "MIT"
Expand Down
Loading