docker(xeon): support running container as non-root user (#27157)
This commit is contained in:
@@ -23,8 +23,9 @@ RUN apt-get update && \
|
||||
|
||||
WORKDIR /opt
|
||||
|
||||
ENV UV_PYTHON_INSTALL_DIR=/usr/local/share/uv/python
|
||||
RUN curl -LsSf https://astral.sh/uv/install.sh | sh && \
|
||||
source $HOME/.local/bin/env && \
|
||||
mv /root/.local/bin/uv /root/.local/bin/uvx /usr/local/bin/ && \
|
||||
uv venv --python 3.12
|
||||
|
||||
RUN echo -e '[[index]]\nname = "torch"\nurl = "https://download.pytorch.org/whl/cpu"\n\n[[index]]\nname = "torchvision"\nurl = "https://download.pytorch.org/whl/cpu"\n\n[[index]]\nname = "torchaudio"\nurl = "https://download.pytorch.org/whl/cpu"\n\n[[index]]\nname = "triton"\nurl = "https://download.pytorch.org/whl/cpu"' > .venv/uv.toml
|
||||
@@ -32,8 +33,7 @@ RUN echo -e '[[index]]\nname = "torch"\nurl = "https://download.pytorch.org/whl/
|
||||
ENV UV_CONFIG_FILE=/opt/.venv/uv.toml
|
||||
|
||||
WORKDIR /sgl-workspace
|
||||
RUN source $HOME/.local/bin/env && \
|
||||
source /opt/.venv/bin/activate && \
|
||||
RUN source /opt/.venv/bin/activate && \
|
||||
git clone ${SGLANG_REPO} sglang && \
|
||||
cd sglang && \
|
||||
git checkout ${VER_SGLANG} && \
|
||||
|
||||
Reference in New Issue
Block a user