fix installing apex in gpu base image

This commit is contained in:
xingjun.wxj
2025-03-21 10:17:27 +08:00
parent 2055c6c9dd
commit 85d07a3342
2 changed files with 3 additions and 3 deletions

View File

@@ -186,14 +186,15 @@ RUN if [ "$USE_GPU" = "True" ] ; then \
RUN if [ "$USE_GPU" = "True" ] ; then \
export TORCH_CUDA_ARCH_LIST="6.0;6.1;7.0;7.5;8.0;8.9;9.0;8.6+PTX" && pip install --no-cache-dir git+https://github.com/gxd1994/Pointnet2.PyTorch.git@master#subdirectory=pointnet2; \
else \
echo 'cpu unsupport Pointnet2'; \
echo 'CPU env does not support Pointnet2'; \
fi
# NVIDIA apex building
RUN if [ "$USE_GPU" = "True" ] ; then \
pip install --no-cache-dir packaging &&\
bash /tmp/install_apex.sh; \
else \
echo 'cpu unsupport nvidia apex'; \
echo 'CPU env does not support NVIDIA Apex.'; \
fi

View File

@@ -3,6 +3,5 @@ export MAX_JOBS=16 \
&& cd apex \
&& git checkout 6bd01c4b99a84648ad5e5238a959735e6936c813 \
&& TORCH_CUDA_ARCH_LIST="6.0;6.1;6.2;7.0;7.5;8.0;8.9;9.0;8.6+PTX" pip install -v --disable-pip-version-check --no-cache --global-option="--cpp_ext" --global-option="--cuda_ext" ./ \
&& pip install packaging \
&& cd .. \
&& rm -rf apex