-
Notifications
You must be signed in to change notification settings - Fork 110
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add dockerfile for flash_attn setup * remove test.py * parametrize model name and engine * Update Dockerfile --------- Co-authored-by: Michael Feil <[email protected]>
- Loading branch information
1 parent
04b422d
commit fddd955
Showing
2 changed files
with
29 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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 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 |
---|---|---|
@@ -0,0 +1,24 @@ | ||
FROM nvcr.io/nvidia/pytorch:24.06-py3 | ||
|
||
|
||
WORKDIR /app | ||
|
||
RUN apt-get update && apt-get install build-essential python3-dev python3.10-venv python3.10 curl -y | ||
|
||
RUN python -m venv .venv | ||
RUN source .venv/bin/activate | ||
RUN pip install flash_attn | ||
|
||
|
||
RUN pip install infinity-emb[all] | ||
|
||
ARG MODEL_NAME | ||
RUN if [ -z "${MODEL_NAME}" ]; then echo "Error: Build argument MODEL_NAME not set." && exit 1; fi | ||
ARG ENGINE | ||
RUN if [ -z "${ENGINE}" ]; then echo "Error: Build argument ENGINE not set." && exit 1; fi | ||
ARG EXTRA_PACKAGES | ||
RUN if [ -n "${EXTRA_PACKAGES}" ]; then pip install --no-cache-dir ${EXTRA_PACKAGES} ; fi | ||
|
||
|
||
RUN infinity_emb v2 --model-id $MODEL_NAME --engine $ENGINE --preload-only || [ $? -eq 3 ] | ||
ENTRYPOINT ["infinity_emb"] |