@@ -51,13 +51,15 @@ RUN python3 -m pip install --upgrade pip
5151# TODO: implement sccache support across components
5252RUN apt-get purge -y sccache; python3 -m pip uninstall -y sccache; rm -f "$(which sccache)"
5353# Install torch == 2.5.0 on ROCm
54- RUN case "$(ls /opt | grep -Po 'rocm-[0-9]\.[0-9]')" in \
54+ RUN --mount=type=cache,target=/root/.cache/pip \
55+ case "$(ls /opt | grep -Po 'rocm-[0-9]\.[0-9]')" in \
5556 *"rocm-6.1"*) \
5657 python3 -m pip uninstall -y torch torchvision \
57- && python3 -m pip install --no-cache-dir -- pre \
58+ && python3 -m pip install --pre \
5859 torch==2.5.0.dev20240726 \
60+ cmake>=3.26 ninja packaging setuptools-scm>=8 wheel jinja2 \
5961 torchvision==0.20.0.dev20240726 \
60- --index-url https://download.pytorch.org/whl/nightly/rocm6.1;; \
62+ --extra- index-url https://download.pytorch.org/whl/nightly/rocm6.1 ;; \
6163 *) ;; esac
6264
6365ENV LLVM_SYMBOLIZER_PATH=/opt/rocm/llvm/bin/llvm-symbolizer
@@ -138,6 +140,7 @@ ENV RAY_EXPERIMENTAL_NOSET_ROCR_VISIBLE_DEVICES=1
138140ENV TOKENIZERS_PARALLELISM=false
139141
140142RUN --mount=type=cache,target=${CCACHE_DIR} \
143+ --mount=type=bind,source=.git,target=.git \
141144 --mount=type=cache,target=/root/.cache/pip \
142145 python3 -m pip install -Ur requirements-rocm.txt \
143146 && case "$(ls /opt | grep -Po 'rocm-[0-9]\.[0-9]')" in \
0 commit comments