Skip to content
Closed
Show file tree
Hide file tree
Changes from all 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
3 changes: 3 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ RUN apt-get update -y && \
rm -rf /var/cache/apt/* && \
rm -rf /var/lib/apt/lists/*

# To keep mooncake can be found
ENV LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

high

While adding /usr/local/lib to LD_LIBRARY_PATH is the correct approach, the current implementation can result in a leading colon (:) if LD_LIBRARY_PATH is not already set. A leading colon in LD_LIBRARY_PATH causes the dynamic linker to search the current working directory, which can be a security risk and may lead to unexpected behavior.

A more robust way to append to LD_LIBRARY_PATH is to use shell parameter expansion to conditionally add the separator. This avoids the leading colon when the variable is initially empty.

ENV LD_LIBRARY_PATH=${LD_LIBRARY_PATH}${LD_LIBRARY_PATH:+:}/usr/local/lib


RUN pip config set global.index-url ${PIP_INDEX_URL}

# Install vLLM
Expand Down
3 changes: 3 additions & 0 deletions Dockerfile.a3
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ RUN apt-get update -y && \
rm -rf /var/cache/apt/* && \
rm -rf /var/lib/apt/lists/*

# To keep mooncake can be found
ENV LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

high

While adding /usr/local/lib to LD_LIBRARY_PATH is the correct approach, the current implementation can result in a leading colon (:) if LD_LIBRARY_PATH is not already set. A leading colon in LD_LIBRARY_PATH causes the dynamic linker to search the current working directory, which can be a security risk and may lead to unexpected behavior.

A more robust way to append to LD_LIBRARY_PATH is to use shell parameter expansion to conditionally add the separator. This avoids the leading colon when the variable is initially empty.

ENV LD_LIBRARY_PATH=${LD_LIBRARY_PATH}${LD_LIBRARY_PATH:+:}/usr/local/lib


# Install vLLM
ARG VLLM_REPO=https://github.com/vllm-project/vllm.git
ARG VLLM_TAG=v0.16.0
Expand Down
3 changes: 3 additions & 0 deletions Dockerfile.a3.openEuler
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ RUN yum update -y && \
rm -fr /vllm-workspace/Mooncake/build && \
rm -rf /var/cache/yum/*

# To keep mooncake can be found
ENV LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

high

While adding /usr/local/lib to LD_LIBRARY_PATH is the correct approach, the current implementation can result in a leading colon (:) if LD_LIBRARY_PATH is not already set. A leading colon in LD_LIBRARY_PATH causes the dynamic linker to search the current working directory, which can be a security risk and may lead to unexpected behavior.

A more robust way to append to LD_LIBRARY_PATH is to use shell parameter expansion to conditionally add the separator. This avoids the leading colon when the variable is initially empty.

ENV LD_LIBRARY_PATH=${LD_LIBRARY_PATH}${LD_LIBRARY_PATH:+:}/usr/local/lib


# Install vLLM
ARG VLLM_REPO=https://github.com/vllm-project/vllm.git
ARG VLLM_TAG=v0.16.0
Expand Down
3 changes: 3 additions & 0 deletions Dockerfile.openEuler
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ RUN yum update -y && \
rm -fr /vllm-workspace/Mooncake/build && \
rm -rf /var/cache/yum/*

# To keep mooncake can be found
ENV LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

high

While adding /usr/local/lib to LD_LIBRARY_PATH is the correct approach, the current implementation can result in a leading colon (:) if LD_LIBRARY_PATH is not already set. A leading colon in LD_LIBRARY_PATH causes the dynamic linker to search the current working directory, which can be a security risk and may lead to unexpected behavior.

A more robust way to append to LD_LIBRARY_PATH is to use shell parameter expansion to conditionally add the separator. This avoids the leading colon when the variable is initially empty.

ENV LD_LIBRARY_PATH=${LD_LIBRARY_PATH}${LD_LIBRARY_PATH:+:}/usr/local/lib


# Install vLLM
ARG VLLM_REPO=https://github.com/vllm-project/vllm.git
ARG VLLM_TAG=v0.16.0
Expand Down
Loading