From acf57beb0b5cc50617b507cb2a6e6ca9e7834434 Mon Sep 17 00:00:00 2001 From: Bibo Hao Date: Sat, 30 Nov 2024 20:54:24 +0800 Subject: [PATCH 01/11] fix torch install on CPU --- .github/workflows/build-docker.yml | 2 +- docker_core/Dockerfile | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-docker.yml b/.github/workflows/build-docker.yml index c155b18..7250c80 100644 --- a/.github/workflows/build-docker.yml +++ b/.github/workflows/build-docker.yml @@ -77,7 +77,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - run: source ./tool.sh && build_image py-chem latest docker_core/Dockerfile --build-arg "ARG_PROFILE_PYTHON=datascience,mkl,chem" && push_image + - run: source ./tool.sh && build_image py-chem latest docker_core/Dockerfile --build-arg "ARG_PROFILE_PYTHON=datascience,mkl,chem,torch" && push_image qpod_py-std: name: 'py-std' diff --git a/docker_core/Dockerfile b/docker_core/Dockerfile index 418afeb..0cc7fcb 100644 --- a/docker_core/Dockerfile +++ b/docker_core/Dockerfile @@ -65,6 +65,9 @@ RUN set -eux \ && ( which java && echo "py4j % Install py4j if Java exists" >> /opt/utils/install_list_PY_datascience.pip || echo "Skip py4j install" ) \ ) || echo "Skip Python datascience packages install" ) \ # ----------------------------- + && CUDA_VER=$(echo ${CUDA_VERSION:-"999"} | cut -c1-4 | sed 's/\.//' ) \ + && echo "Detected CUDA version: ${CUDA_VER}" \ + # ----------------------------- && echo "Handle tensorflow installation 1.x/2.x, cpu/gpu: https://www.tensorflow.org/install/source#gpu" \ && ( $(grep -q "tf" <<< "${ARG_PROFILE_PYTHON}") && ( \ V=$($(grep -q "tf1" <<< "${ARG_PROFILE_PYTHON}") && echo "1" || echo "2" ) \ @@ -74,7 +77,6 @@ RUN set -eux \ # ----------------------------- && echo "Handle pytorch installation 1.x only, cpu/gpu: https://pytorch.org/get-started/locally/" \ && ( $(grep -q "torch" <<< "${ARG_PROFILE_PYTHON}") && ( \ - CUDA_VER=$(echo "${CUDA_VERSION:0:4}" | sed 's/\.//' ) \ && echo "If CUDA version < 11.7, install pytorch 1.x, else install pytorch 2.x; if cuda doesn't exist, install pytorch 2.x" \ && export CUDA_VER_TORCH="117" && V=$([[ "${CUDA_VER:-999}" -lt "${CUDA_VER_TORCH}" ]] && echo "torch<2" || echo "torch") \ && IDX=$( [ -x "$(command -v nvcc)" ] && echo "cu${CUDA_VER:-117}" || echo "cpu" ) \ @@ -86,7 +88,6 @@ RUN set -eux \ && if $(grep -q "paddle" <<< "${ARG_PROFILE_PYTHON}") ; then \ URL_PYPI_PADDLE="https://www.paddlepaddle.org.cn/whl/linux/mkl/avx/stable.html" \ && export PIP_FIND_LINKS="${URL_PYPI_PADDLE} ${PIP_FIND_LINKS:-}" \ - && CUDA_VER=$(echo "${CUDA_VERSION:0:4}" | sed 's/\.//' ) \ && PADDLE=$( [ -x "$(command -v nvcc)" ] && echo "paddlepaddle-gpu" || echo "paddlepaddle") \ && PADDLE_VER=$(pip index versions ${PADDLE} -f ${URL_PYPI_PADDLE} | grep 'Available' | cut -d ":" -f 2 | tr ', ' '\n' | grep ${CUDA_VER:-'.'} | head -n 1) \ && V=$(echo ${PADDLE}==${PADDLE_VER}) && echo "to install paddle: ${V}" \ From 986bf2255020a4b2a69b2f863bbf41722aee08e6 Mon Sep 17 00:00:00 2001 From: Bibo Hao Date: Sat, 30 Nov 2024 21:00:16 +0800 Subject: [PATCH 02/11] typo --- .github/workflows/build-docker.yml | 5 ++++- docker_core/Dockerfile | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-docker.yml b/.github/workflows/build-docker.yml index 7250c80..5e10477 100644 --- a/.github/workflows/build-docker.yml +++ b/.github/workflows/build-docker.yml @@ -11,7 +11,10 @@ on: workflow_dispatch: # Allows you to run this workflow manually from the Actions tab - +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + env: BUILDKIT_PROGRESS: "plain" # Full logs for CI build. REGISTRY_URL: "docker.io" # docker.io or other target registry URL: where to push images to. diff --git a/docker_core/Dockerfile b/docker_core/Dockerfile index 0cc7fcb..38a4dd9 100644 --- a/docker_core/Dockerfile +++ b/docker_core/Dockerfile @@ -77,7 +77,7 @@ RUN set -eux \ # ----------------------------- && echo "Handle pytorch installation 1.x only, cpu/gpu: https://pytorch.org/get-started/locally/" \ && ( $(grep -q "torch" <<< "${ARG_PROFILE_PYTHON}") && ( \ - && echo "If CUDA version < 11.7, install pytorch 1.x, else install pytorch 2.x; if cuda doesn't exist, install pytorch 2.x" \ + echo "If CUDA version < 11.7, install pytorch 1.x, else install pytorch 2.x; if cuda doesn't exist, install pytorch 2.x" \ && export CUDA_VER_TORCH="117" && V=$([[ "${CUDA_VER:-999}" -lt "${CUDA_VER_TORCH}" ]] && echo "torch<2" || echo "torch") \ && IDX=$( [ -x "$(command -v nvcc)" ] && echo "cu${CUDA_VER:-117}" || echo "cpu" ) \ && export PIP_FIND_LINKS="https://download.pytorch.org/whl/${IDX}/torch_stable.html ${PIP_FIND_LINKS:-}" \ From 84f506a6321d220e2d0090007538bff04e11e02b Mon Sep 17 00:00:00 2001 From: Bibo Hao Date: Sat, 30 Nov 2024 21:28:41 +0800 Subject: [PATCH 03/11] debug toch install --- docker_core/Dockerfile | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/docker_core/Dockerfile b/docker_core/Dockerfile index 38a4dd9..a893396 100644 --- a/docker_core/Dockerfile +++ b/docker_core/Dockerfile @@ -80,24 +80,25 @@ RUN set -eux \ echo "If CUDA version < 11.7, install pytorch 1.x, else install pytorch 2.x; if cuda doesn't exist, install pytorch 2.x" \ && export CUDA_VER_TORCH="117" && V=$([[ "${CUDA_VER:-999}" -lt "${CUDA_VER_TORCH}" ]] && echo "torch<2" || echo "torch") \ && IDX=$( [ -x "$(command -v nvcc)" ] && echo "cu${CUDA_VER:-117}" || echo "cpu" ) \ - && export PIP_FIND_LINKS="https://download.pytorch.org/whl/${IDX}/torch_stable.html ${PIP_FIND_LINKS:-}" \ && echo "${V}" > /opt/utils/install_list_PY_torch.pip \ + && export PIP_FIND_LINKS="https://download.pytorch.org/whl/${IDX} ${PIP_FIND_LINKS:-}" \ ) || echo "Skipping pytorch install" ) \ # ----------------------------- && echo "Handle paddle installation, cpu/gpu: https://www.paddlepaddle.org.cn/" \ - && if $(grep -q "paddle" <<< "${ARG_PROFILE_PYTHON}") ; then \ + && ( $(grep -q "paddle" <<< "${ARG_PROFILE_PYTHON}") && ( \ URL_PYPI_PADDLE="https://www.paddlepaddle.org.cn/whl/linux/mkl/avx/stable.html" \ - && export PIP_FIND_LINKS="${URL_PYPI_PADDLE} ${PIP_FIND_LINKS:-}" \ && PADDLE=$( [ -x "$(command -v nvcc)" ] && echo "paddlepaddle-gpu" || echo "paddlepaddle") \ && PADDLE_VER=$(pip index versions ${PADDLE} -f ${URL_PYPI_PADDLE} | grep 'Available' | cut -d ":" -f 2 | tr ', ' '\n' | grep ${CUDA_VER:-'.'} | head -n 1) \ && V=$(echo ${PADDLE}==${PADDLE_VER}) && echo "to install paddle: ${V}" \ - && echo "${V}" > /opt/utils/install_list_PY_paddle.pip ; \ - else \ - echo "Skip paddle install" ; \ - fi \ + && echo "${V}" > /opt/utils/install_list_PY_paddle.pip \ + && export PIP_FIND_LINKS="${URL_PYPI_PADDLE} ${PIP_FIND_LINKS:-}" \ + ) || echo "Skip paddle install" ) \ # ----------------------------- - && echo "PIP_FIND_LINKS=${PIP_FIND_LINKS:-default}" \ - && for profile in $(echo $ARG_PROFILE_PYTHON | tr "," "\n") ; do ( echo "Pip install for ${profile}" ; install_pip "/opt/utils/install_list_PY_${profile}.pip" ; ) ; done \ + && echo "PIP_FIND_LINKS is set to: ${PIP_FIND_LINKS}" \ + && for profile in $(echo $ARG_PROFILE_PYTHON | tr "," "\n") ; do ( \ + [ -f "/opt/utils/install_list_PY_${profile}.apt" ] && install_apt "/opt/utils/install_list_PY_${profile}.apt" || echo "apt install skipped for ${profile}" ; \ + [ -f "/opt/utils/install_list_PY_${profile}.pip" ] && install_pip "/opt/utils/install_list_PY_${profile}.pip" || echo "pip install skipped for ${profile}" ; \ + ) ; done \ # ----------------------------- && if echo "${ARG_PROFILE_GO}" | grep -q "base" ; then \ echo "Installing GO: ${ARG_PROFILE_GO}" && setup_GO ; \ From cb6e331415b1063b122e08c6373ba86da76f2214 Mon Sep 17 00:00:00 2001 From: Bibo Hao Date: Sat, 30 Nov 2024 21:36:18 +0800 Subject: [PATCH 04/11] fix unbound variable --- docker_core/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker_core/Dockerfile b/docker_core/Dockerfile index a893396..c4fe15a 100644 --- a/docker_core/Dockerfile +++ b/docker_core/Dockerfile @@ -94,7 +94,7 @@ RUN set -eux \ && export PIP_FIND_LINKS="${URL_PYPI_PADDLE} ${PIP_FIND_LINKS:-}" \ ) || echo "Skip paddle install" ) \ # ----------------------------- - && echo "PIP_FIND_LINKS is set to: ${PIP_FIND_LINKS}" \ + && [ -z "${PIP_FIND_LINKS+x}" ] && echo "PIP_FIND_LINKS is set to: ${PIP_FIND_LINKS}" || echo "PIP_FIND_LINKS is not set!" \ && for profile in $(echo $ARG_PROFILE_PYTHON | tr "," "\n") ; do ( \ [ -f "/opt/utils/install_list_PY_${profile}.apt" ] && install_apt "/opt/utils/install_list_PY_${profile}.apt" || echo "apt install skipped for ${profile}" ; \ [ -f "/opt/utils/install_list_PY_${profile}.pip" ] && install_pip "/opt/utils/install_list_PY_${profile}.pip" || echo "pip install skipped for ${profile}" ; \ From f3164222716672e277d59f4e02ed0d54a6c20f8c Mon Sep 17 00:00:00 2001 From: Bibo Hao Date: Sat, 30 Nov 2024 21:46:54 +0800 Subject: [PATCH 05/11] debug unbound vars --- docker_core/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker_core/Dockerfile b/docker_core/Dockerfile index c4fe15a..29f30ce 100644 --- a/docker_core/Dockerfile +++ b/docker_core/Dockerfile @@ -94,7 +94,7 @@ RUN set -eux \ && export PIP_FIND_LINKS="${URL_PYPI_PADDLE} ${PIP_FIND_LINKS:-}" \ ) || echo "Skip paddle install" ) \ # ----------------------------- - && [ -z "${PIP_FIND_LINKS+x}" ] && echo "PIP_FIND_LINKS is set to: ${PIP_FIND_LINKS}" || echo "PIP_FIND_LINKS is not set!" \ + && [ "${PIP_FIND_LINKS+set}" != "set" ] && echo "PIP_FIND_LINKS is not set!" || echo "PIP_FIND_LINKS is set to: ${PIP_FIND_LINKS}" \ && for profile in $(echo $ARG_PROFILE_PYTHON | tr "," "\n") ; do ( \ [ -f "/opt/utils/install_list_PY_${profile}.apt" ] && install_apt "/opt/utils/install_list_PY_${profile}.apt" || echo "apt install skipped for ${profile}" ; \ [ -f "/opt/utils/install_list_PY_${profile}.pip" ] && install_pip "/opt/utils/install_list_PY_${profile}.pip" || echo "pip install skipped for ${profile}" ; \ From 275a1dfe26296ea32b7ecb462aa4c2ac868568f0 Mon Sep 17 00:00:00 2001 From: Bibo Hao Date: Sat, 30 Nov 2024 21:59:23 +0800 Subject: [PATCH 06/11] debug torch/paddle install --- docker_core/Dockerfile | 8 +++----- docker_core/work/install_list_PY_torch.pip | 4 ---- 2 files changed, 3 insertions(+), 9 deletions(-) delete mode 100644 docker_core/work/install_list_PY_torch.pip diff --git a/docker_core/Dockerfile b/docker_core/Dockerfile index 29f30ce..d3c7300 100644 --- a/docker_core/Dockerfile +++ b/docker_core/Dockerfile @@ -80,8 +80,7 @@ RUN set -eux \ echo "If CUDA version < 11.7, install pytorch 1.x, else install pytorch 2.x; if cuda doesn't exist, install pytorch 2.x" \ && export CUDA_VER_TORCH="117" && V=$([[ "${CUDA_VER:-999}" -lt "${CUDA_VER_TORCH}" ]] && echo "torch<2" || echo "torch") \ && IDX=$( [ -x "$(command -v nvcc)" ] && echo "cu${CUDA_VER:-117}" || echo "cpu" ) \ - && echo "${V}" > /opt/utils/install_list_PY_torch.pip \ - && export PIP_FIND_LINKS="https://download.pytorch.org/whl/${IDX} ${PIP_FIND_LINKS:-}" \ + && pip install "${V}" torchvision torchaudio --index-url "https://download.pytorch.org/whl/${IDX} \ ) || echo "Skipping pytorch install" ) \ # ----------------------------- && echo "Handle paddle installation, cpu/gpu: https://www.paddlepaddle.org.cn/" \ @@ -90,11 +89,10 @@ RUN set -eux \ && PADDLE=$( [ -x "$(command -v nvcc)" ] && echo "paddlepaddle-gpu" || echo "paddlepaddle") \ && PADDLE_VER=$(pip index versions ${PADDLE} -f ${URL_PYPI_PADDLE} | grep 'Available' | cut -d ":" -f 2 | tr ', ' '\n' | grep ${CUDA_VER:-'.'} | head -n 1) \ && V=$(echo ${PADDLE}==${PADDLE_VER}) && echo "to install paddle: ${V}" \ - && echo "${V}" > /opt/utils/install_list_PY_paddle.pip \ - && export PIP_FIND_LINKS="${URL_PYPI_PADDLE} ${PIP_FIND_LINKS:-}" \ + && pip install --index-url ${URL_PYPI_PADDLE} "${V}" > \ ) || echo "Skip paddle install" ) \ # ----------------------------- - && [ "${PIP_FIND_LINKS+set}" != "set" ] && echo "PIP_FIND_LINKS is not set!" || echo "PIP_FIND_LINKS is set to: ${PIP_FIND_LINKS}" \ + # && [ "${PIP_FIND_LINKS+set}" != "set" ] && echo "PIP_FIND_LINKS is not set!" || echo "PIP_FIND_LINKS is set to: ${PIP_FIND_LINKS}" \ && for profile in $(echo $ARG_PROFILE_PYTHON | tr "," "\n") ; do ( \ [ -f "/opt/utils/install_list_PY_${profile}.apt" ] && install_apt "/opt/utils/install_list_PY_${profile}.apt" || echo "apt install skipped for ${profile}" ; \ [ -f "/opt/utils/install_list_PY_${profile}.pip" ] && install_pip "/opt/utils/install_list_PY_${profile}.pip" || echo "pip install skipped for ${profile}" ; \ diff --git a/docker_core/work/install_list_PY_torch.pip b/docker_core/work/install_list_PY_torch.pip deleted file mode 100644 index 6ec9b57..0000000 --- a/docker_core/work/install_list_PY_torch.pip +++ /dev/null @@ -1,4 +0,0 @@ -% This file contains python packages to be installed with pip line by line. -% Use percent char as line comment separator. - -numpy % torch requires numpy but didn't declare it in its file From 691bdadd6db4412f660bcc023d3ae7a60d827a53 Mon Sep 17 00:00:00 2001 From: Bibo Hao Date: Sat, 30 Nov 2024 22:06:07 +0800 Subject: [PATCH 07/11] typo --- docker_core/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docker_core/Dockerfile b/docker_core/Dockerfile index d3c7300..ed41d36 100644 --- a/docker_core/Dockerfile +++ b/docker_core/Dockerfile @@ -80,7 +80,7 @@ RUN set -eux \ echo "If CUDA version < 11.7, install pytorch 1.x, else install pytorch 2.x; if cuda doesn't exist, install pytorch 2.x" \ && export CUDA_VER_TORCH="117" && V=$([[ "${CUDA_VER:-999}" -lt "${CUDA_VER_TORCH}" ]] && echo "torch<2" || echo "torch") \ && IDX=$( [ -x "$(command -v nvcc)" ] && echo "cu${CUDA_VER:-117}" || echo "cpu" ) \ - && pip install "${V}" torchvision torchaudio --index-url "https://download.pytorch.org/whl/${IDX} \ + && pip install --no-cache-dir --root-user-action=ignore -U --pre "${V}" torchvision torchaudio --index-url "https://download.pytorch.org/whl/${IDX}" \ ) || echo "Skipping pytorch install" ) \ # ----------------------------- && echo "Handle paddle installation, cpu/gpu: https://www.paddlepaddle.org.cn/" \ @@ -89,7 +89,7 @@ RUN set -eux \ && PADDLE=$( [ -x "$(command -v nvcc)" ] && echo "paddlepaddle-gpu" || echo "paddlepaddle") \ && PADDLE_VER=$(pip index versions ${PADDLE} -f ${URL_PYPI_PADDLE} | grep 'Available' | cut -d ":" -f 2 | tr ', ' '\n' | grep ${CUDA_VER:-'.'} | head -n 1) \ && V=$(echo ${PADDLE}==${PADDLE_VER}) && echo "to install paddle: ${V}" \ - && pip install --index-url ${URL_PYPI_PADDLE} "${V}" > \ + && pip install --no-cache-dir --root-user-action=ignore -U --pre --index-url ${URL_PYPI_PADDLE} "${V}" > \ ) || echo "Skip paddle install" ) \ # ----------------------------- # && [ "${PIP_FIND_LINKS+set}" != "set" ] && echo "PIP_FIND_LINKS is not set!" || echo "PIP_FIND_LINKS is set to: ${PIP_FIND_LINKS}" \ From afec652870ce8b9e5ab96d831165abb7d065929e Mon Sep 17 00:00:00 2001 From: Bibo Hao Date: Sat, 30 Nov 2024 22:13:16 +0800 Subject: [PATCH 08/11] typo --- docker_core/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker_core/Dockerfile b/docker_core/Dockerfile index ed41d36..a90f05e 100644 --- a/docker_core/Dockerfile +++ b/docker_core/Dockerfile @@ -89,7 +89,7 @@ RUN set -eux \ && PADDLE=$( [ -x "$(command -v nvcc)" ] && echo "paddlepaddle-gpu" || echo "paddlepaddle") \ && PADDLE_VER=$(pip index versions ${PADDLE} -f ${URL_PYPI_PADDLE} | grep 'Available' | cut -d ":" -f 2 | tr ', ' '\n' | grep ${CUDA_VER:-'.'} | head -n 1) \ && V=$(echo ${PADDLE}==${PADDLE_VER}) && echo "to install paddle: ${V}" \ - && pip install --no-cache-dir --root-user-action=ignore -U --pre --index-url ${URL_PYPI_PADDLE} "${V}" > \ + && pip install --no-cache-dir --root-user-action=ignore -U --pre --index-url ${URL_PYPI_PADDLE} "${V}" \ ) || echo "Skip paddle install" ) \ # ----------------------------- # && [ "${PIP_FIND_LINKS+set}" != "set" ] && echo "PIP_FIND_LINKS is not set!" || echo "PIP_FIND_LINKS is set to: ${PIP_FIND_LINKS}" \ From 1715544c3cbfcd028c734a74cfc1d3d39e315242 Mon Sep 17 00:00:00 2001 From: Bibo Hao Date: Sat, 30 Nov 2024 22:40:40 +0800 Subject: [PATCH 09/11] debug --- docker_core/Dockerfile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docker_core/Dockerfile b/docker_core/Dockerfile index a90f05e..391d6f1 100644 --- a/docker_core/Dockerfile +++ b/docker_core/Dockerfile @@ -65,8 +65,9 @@ RUN set -eux \ && ( which java && echo "py4j % Install py4j if Java exists" >> /opt/utils/install_list_PY_datascience.pip || echo "Skip py4j install" ) \ ) || echo "Skip Python datascience packages install" ) \ # ----------------------------- - && CUDA_VER=$(echo ${CUDA_VERSION:-"999"} | cut -c1-4 | sed 's/\.//' ) \ - && echo "Detected CUDA version: ${CUDA_VER}" \ + && export CUDA_VER=$(echo ${CUDA_VERSION:-"999"} | cut -c1-4 | sed 's/\.//' ) \ + && export IDX=$( [ -x "$(command -v nvcc)" ] && echo "cu${CUDA_VER:-117}" || echo "cpu" ) \ + && echo "Detected CUDA version=${CUDA_VER} and IDX=${IDX}" \ # ----------------------------- && echo "Handle tensorflow installation 1.x/2.x, cpu/gpu: https://www.tensorflow.org/install/source#gpu" \ && ( $(grep -q "tf" <<< "${ARG_PROFILE_PYTHON}") && ( \ @@ -79,13 +80,12 @@ RUN set -eux \ && ( $(grep -q "torch" <<< "${ARG_PROFILE_PYTHON}") && ( \ echo "If CUDA version < 11.7, install pytorch 1.x, else install pytorch 2.x; if cuda doesn't exist, install pytorch 2.x" \ && export CUDA_VER_TORCH="117" && V=$([[ "${CUDA_VER:-999}" -lt "${CUDA_VER_TORCH}" ]] && echo "torch<2" || echo "torch") \ - && IDX=$( [ -x "$(command -v nvcc)" ] && echo "cu${CUDA_VER:-117}" || echo "cpu" ) \ && pip install --no-cache-dir --root-user-action=ignore -U --pre "${V}" torchvision torchaudio --index-url "https://download.pytorch.org/whl/${IDX}" \ ) || echo "Skipping pytorch install" ) \ # ----------------------------- && echo "Handle paddle installation, cpu/gpu: https://www.paddlepaddle.org.cn/" \ && ( $(grep -q "paddle" <<< "${ARG_PROFILE_PYTHON}") && ( \ - URL_PYPI_PADDLE="https://www.paddlepaddle.org.cn/whl/linux/mkl/avx/stable.html" \ + URL_PYPI_PADDLE="https://www.paddlepaddle.org.cn/packages/stable/${IDX}" \ && PADDLE=$( [ -x "$(command -v nvcc)" ] && echo "paddlepaddle-gpu" || echo "paddlepaddle") \ && PADDLE_VER=$(pip index versions ${PADDLE} -f ${URL_PYPI_PADDLE} | grep 'Available' | cut -d ":" -f 2 | tr ', ' '\n' | grep ${CUDA_VER:-'.'} | head -n 1) \ && V=$(echo ${PADDLE}==${PADDLE_VER}) && echo "to install paddle: ${V}" \ From a724e5d8b262d5bbcd14ac54505b30f8b195dfb3 Mon Sep 17 00:00:00 2001 From: Bibo Hao Date: Sat, 30 Nov 2024 22:50:54 +0800 Subject: [PATCH 10/11] debug paddle install --- docker_core/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker_core/Dockerfile b/docker_core/Dockerfile index 391d6f1..61889b9 100644 --- a/docker_core/Dockerfile +++ b/docker_core/Dockerfile @@ -85,7 +85,7 @@ RUN set -eux \ # ----------------------------- && echo "Handle paddle installation, cpu/gpu: https://www.paddlepaddle.org.cn/" \ && ( $(grep -q "paddle" <<< "${ARG_PROFILE_PYTHON}") && ( \ - URL_PYPI_PADDLE="https://www.paddlepaddle.org.cn/packages/stable/${IDX}" \ + URL_PYPI_PADDLE="https://www.paddlepaddle.org.cn/packages/stable/${IDX}/" \ && PADDLE=$( [ -x "$(command -v nvcc)" ] && echo "paddlepaddle-gpu" || echo "paddlepaddle") \ && PADDLE_VER=$(pip index versions ${PADDLE} -f ${URL_PYPI_PADDLE} | grep 'Available' | cut -d ":" -f 2 | tr ', ' '\n' | grep ${CUDA_VER:-'.'} | head -n 1) \ && V=$(echo ${PADDLE}==${PADDLE_VER}) && echo "to install paddle: ${V}" \ From 5d529c025390199ae6431a6ad8fcfbdd6597842a Mon Sep 17 00:00:00 2001 From: Bibo Hao Date: Sat, 30 Nov 2024 23:02:50 +0800 Subject: [PATCH 11/11] fix paddle resolve --- docker_core/Dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docker_core/Dockerfile b/docker_core/Dockerfile index 61889b9..9294764 100644 --- a/docker_core/Dockerfile +++ b/docker_core/Dockerfile @@ -87,9 +87,9 @@ RUN set -eux \ && ( $(grep -q "paddle" <<< "${ARG_PROFILE_PYTHON}") && ( \ URL_PYPI_PADDLE="https://www.paddlepaddle.org.cn/packages/stable/${IDX}/" \ && PADDLE=$( [ -x "$(command -v nvcc)" ] && echo "paddlepaddle-gpu" || echo "paddlepaddle") \ - && PADDLE_VER=$(pip index versions ${PADDLE} -f ${URL_PYPI_PADDLE} | grep 'Available' | cut -d ":" -f 2 | tr ', ' '\n' | grep ${CUDA_VER:-'.'} | head -n 1) \ - && V=$(echo ${PADDLE}==${PADDLE_VER}) && echo "to install paddle: ${V}" \ - && pip install --no-cache-dir --root-user-action=ignore -U --pre --index-url ${URL_PYPI_PADDLE} "${V}" \ + # && PADDLE_VER=$(pip index versions ${PADDLE} -f ${URL_PYPI_PADDLE} | grep 'Available' | cut -d ":" -f 2 | tr ', ' '\n' | grep ${CUDA_VER:-'.'} | head -n 1) \ + # && V=$(echo ${PADDLE}==${PADDLE_VER}) && echo "to install paddle: ${V}" \ + && pip install --no-cache-dir --root-user-action=ignore -U --pre --index-url ${URL_PYPI_PADDLE} "${PADDLE}" \ ) || echo "Skip paddle install" ) \ # ----------------------------- # && [ "${PIP_FIND_LINKS+set}" != "set" ] && echo "PIP_FIND_LINKS is not set!" || echo "PIP_FIND_LINKS is set to: ${PIP_FIND_LINKS}" \