From 96f2133a32472ce63d706ec94106051c5905a62f Mon Sep 17 00:00:00 2001 From: henryruhs Date: Tue, 26 Sep 2023 19:11:59 +0200 Subject: [PATCH] Proper escape versions --- Dockerfile.cpu | 2 +- Dockerfile.cuda | 2 +- Dockerfile.rocm | 16 +++++++++------- 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/Dockerfile.cpu b/Dockerfile.cpu index 2da600f..18a7812 100644 --- a/Dockerfile.cpu +++ b/Dockerfile.cpu @@ -9,5 +9,5 @@ RUN apt-get update RUN apt-get install curl -y RUN apt-get install ffmpeg -y -RUN git clone https://github.com/facefusion/facefusion.git --branch $FACEFUSION_VERSION --single-branch . +RUN git clone https://github.com/facefusion/facefusion.git --branch ${FACEFUSION_VERSION} --single-branch . RUN python install.py --onnxruntime cpu diff --git a/Dockerfile.cuda b/Dockerfile.cuda index 98ca0fe..25c0f46 100644 --- a/Dockerfile.cuda +++ b/Dockerfile.cuda @@ -13,5 +13,5 @@ RUN apt-get install git -y RUN apt-get install curl -y RUN apt-get install ffmpeg -y -RUN git clone https://github.com/facefusion/facefusion.git --branch $FACEFUSION_VERSION --single-branch . +RUN git clone https://github.com/facefusion/facefusion.git --branch ${FACEFUSION_VERSION} --single-branch . RUN python install.py --onnxruntime cuda diff --git a/Dockerfile.rocm b/Dockerfile.rocm index f8e67e9..58f2193 100644 --- a/Dockerfile.rocm +++ b/Dockerfile.rocm @@ -2,6 +2,8 @@ FROM rocm/dev-ubuntu-22.04:5.4.2-complete ARG FACEFUSION_VERSION=1.2.1 ARG ONNXRUNTIME_VERSION=1.15.0 +ARG ROCM_VERSION=5.4.2 +ARG CMAKE_VERSION=3.27.4 ENV GRADIO_SERVER_NAME=0.0.0.0 RUN apt-get update @@ -15,19 +17,19 @@ RUN pip install flake8 RUN pip install packaging RUN pip install wheel -RUN curl -L https://github.com/Kitware/CMake/releases/download/v3.27.4/cmake-3.27.4-linux-x86_64.tar.gz | tar xz -C /opt -RUN sudo ln -sf /opt/cmake-3.27.4-linux-x86_64/bin/cmake /usr/bin/cmake -RUN sudo ln -sf /opt/cmake-3.27.4-linux-x86_64/bin/ctest /usr/bin/ctest +RUN curl -L https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/cmake-${CMAKE_VERSION}-linux-x86_64.tar.gz | tar xz -C /opt +RUN sudo ln -sf /opt/cmake-${CMAKE_VERSION}-linux-x86_64/bin/cmake /usr/bin/cmake +RUN sudo ln -sf /opt/cmake-${CMAKE_VERSION}-linux-x86_64/bin/ctest /usr/bin/ctest WORKDIR /onnxruntime -RUN git clone https://github.com/Microsoft/onnxruntime --branch v$ONNXRUNTIME_VERSION --single-branch . +RUN git clone https://github.com/Microsoft/onnxruntime --branch v${ONNXRUNTIME_VERSION} --single-branch . RUN chmod +x /onnxruntime/tools/ci_build/build.py -RUN /onnxruntime/tools/ci_build/build.py --allow_running_as_root --build_dir build --config Release --build_wheel --update --build --parallel --skip_tests --cmake_extra_defines ONNXRUNTIME_VERSION=$ONNXRUNTIME_VERSION --use_rocm --rocm_home /opt/rocm +RUN /onnxruntime/tools/ci_build/build.py --allow_running_as_root --build_dir build --config Release --build_wheel --update --build --parallel --skip_tests --cmake_extra_defines ONNXRUNTIME_VERSION=${ONNXRUNTIME_VERSION} --use_rocm --rocm_home /opt/rocm WORKDIR /facefusion -RUN git clone https://github.com/facefusion/facefusion.git --branch $FACEFUSION_VERSION --single-branch . -RUN pip install -r requirements.txt --extra-index-url https://download.pytorch.org/whl/rocm5.4.2 +RUN git clone https://github.com/facefusion/facefusion.git --branch ${FACEFUSION_VERSION} --single-branch . +RUN pip install -r requirements.txt --extra-index-url https://download.pytorch.org/whl/rocm${ROCM_VERSION} RUN pip uninstall onnxruntime -y RUN pip install /onnxruntime/build/Release/dist/*.whl