@@ -51,13 +51,15 @@ RUN python3 -m pip install --upgrade pip
51
51
# TODO: implement sccache support across components
52
52
RUN apt-get purge -y sccache; python3 -m pip uninstall -y sccache; rm -f "$(which sccache)"
53
53
# 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 \
55
56
*"rocm-6.1"*) \
56
57
python3 -m pip uninstall -y torch torchvision \
57
- && python3 -m pip install --no-cache-dir -- pre \
58
+ && python3 -m pip install --pre \
58
59
torch==2.5.0.dev20240726 \
60
+ cmake>=3.26 ninja packaging setuptools-scm>=8 wheel jinja2 \
59
61
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 ;; \
61
63
*) ;; esac
62
64
63
65
ENV LLVM_SYMBOLIZER_PATH=/opt/rocm/llvm/bin/llvm-symbolizer
@@ -138,6 +140,7 @@ ENV RAY_EXPERIMENTAL_NOSET_ROCR_VISIBLE_DEVICES=1
138
140
ENV TOKENIZERS_PARALLELISM=false
139
141
140
142
RUN --mount=type=cache,target=${CCACHE_DIR} \
143
+ --mount=type=bind,source=.git,target=.git \
141
144
--mount=type=cache,target=/root/.cache/pip \
142
145
python3 -m pip install -Ur requirements-rocm.txt \
143
146
&& case "$(ls /opt | grep -Po 'rocm-[0-9]\.[0-9]')" in \
0 commit comments