diff --git a/.dev_scripts/build_image.sh b/.dev_scripts/build_image.sh index 08f6299b..2f9b3092 100644 --- a/.dev_scripts/build_image.sh +++ b/.dev_scripts/build_image.sh @@ -106,7 +106,7 @@ if [ "$is_cpu" == "True" ]; then base_tag=ubuntu20.04 export USE_GPU=False else - base_tag=ubuntu20.04-$cuda_version + base_tag=ubuntu20.04-cuda$cuda_version export USE_GPU=True fi @@ -158,6 +158,12 @@ else docker_file_content="${docker_file_content} \nENV MODELSCOPE_CACHE=/mnt/workspace/.cache/modelscope" # pre compile extension docker_file_content="${docker_file_content} \nRUN python -c 'from modelscope.utils.pre_compile import pre_compile_all;pre_compile_all()'" + if [ "$is_cpu" == "True" ]; then + echo 'build cpu image' + else + # fix easycv extension and tinycudann conflict. + docker_file_content="${docker_file_content} \nRUN bash /tmp/install_tiny_cuda_nn.sh" + fi fi if [ "$is_ci_test" == "True" ]; then echo "Building CI image, uninstall modelscope" diff --git a/docker/Dockerfile.ubuntu b/docker/Dockerfile.ubuntu index 28763a77..1408805e 100644 --- a/docker/Dockerfile.ubuntu +++ b/docker/Dockerfile.ubuntu @@ -43,3 +43,6 @@ COPY examples /modelscope/examples ENV SETUPTOOLS_USE_DISTUTILS=stdlib RUN CUDA_HOME=/usr/local/cuda TORCH_CUDA_ARCH_LIST="6.0 6.1 7.0 7.5 8.0 8.6" pip install --no-cache-dir 'git+https://github.com/facebookresearch/detectron2.git' + +# add basicsr +RUN pip install --no-cache-dir basicsr