docker(xpu): drop redundant setvars.sh from torch_memory_saver RUN (#38665)

Co-authored-by: arathi-hlab <arathi-hlab@users.noreply.github.com>
This commit is contained in:
ashwini rathi
2026-09-10 10:14:50 +08:00
committed by GitHub
co-authored by arathi-hlab
parent fd596a474c
commit 9a1b1d2d5e
+4 -7
View File
@@ -91,12 +91,9 @@ RUN echo "Cloning ${SG_LANG_BRANCH} from ${SG_LANG_REPO}" && \
# major to it -- under build isolation torch is absent and the match is skipped.
# Pinned (v0.0.10b2) so image builds are reproducible; bump via --build-arg.
ARG TORCH_MEMORY_SAVER_REF=a5c99f11b18ebb8e9fda71a68812e476ae49e417
# Keep setvars.sh's stderr and don't chain with `&&`: an optional component's
# vars.sh can exit non-zero while SYCL is still exported. `set -e` fails on pip.
RUN set -e; \
. /opt/intel/oneapi/setvars.sh --force || \
echo "setvars.sh exited $? -- continuing; pip will fail loudly if SYCL is missing"; \
TMS_PLATFORM=xpu pip install --no-cache-dir --no-build-isolation \
# Base image already applies setvars.sh in its own layers (SETVARS_COMPLETED=1,
# icpx on PATH, LIBRARY_PATH/CPATH populated), so re-sourcing here is redundant.
RUN TMS_PLATFORM=xpu pip install --no-cache-dir --no-build-isolation \
git+https://github.com/fzyzcjy/torch_memory_saver.git@${TORCH_MEMORY_SAVER_REF}
CMD ["bash", "-c", "source /opt/intel/oneapi/setvars.sh --force && exec bash"]
CMD ["bash"]