fix: allow for transformers_version
This commit is contained in:
+2
-1
@@ -53,6 +53,7 @@ RUN if [ "${VLLM_NIGHTLY}" = "true" ]; then \
|
||||
fi
|
||||
|
||||
COPY src /src
|
||||
RUN chmod +x /src/start.sh
|
||||
RUN --mount=type=secret,id=HF_TOKEN,required=false \
|
||||
if [ -f /run/secrets/HF_TOKEN ]; then \
|
||||
export HF_TOKEN=$(cat /run/secrets/HF_TOKEN); \
|
||||
@@ -62,4 +63,4 @@ RUN --mount=type=secret,id=HF_TOKEN,required=false \
|
||||
fi
|
||||
|
||||
# Start the handler
|
||||
CMD ["python3", "/src/handler.py"]
|
||||
CMD ["/bin/bash", "/src/start.sh"]
|
||||
|
||||
@@ -9,7 +9,7 @@ typing-extensions>=4.8.0
|
||||
pydantic
|
||||
pydantic-settings
|
||||
hf-transfer
|
||||
transformers>=5.2.0,<5.3.0
|
||||
transformers>= 4.57.0,< 5
|
||||
bitsandbytes>=0.45.0
|
||||
kernels
|
||||
torch-c-dlpack-ext
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
if [ -n "${TRANSFORMERS_VERSION}" ]; then
|
||||
echo "Installing transformers==${TRANSFORMERS_VERSION}"
|
||||
uv pip install --system "transformers==${TRANSFORMERS_VERSION}"
|
||||
fi
|
||||
|
||||
exec python3 /src/handler.py
|
||||
Reference in New Issue
Block a user