diff options
author | Chunseok Lee <chunseok.lee@samsung.com> | 2022-04-15 19:15:11 +0900 |
---|---|---|
committer | Chunseok Lee <chunseok.lee@samsung.com> | 2022-04-15 19:15:11 +0900 |
commit | 3ad689f0803519e343c36d5700646e86059df961 (patch) | |
tree | 862346c401a5577518fa7f042532aa931b53aa0e /compiler/one-cmds/one-prepare-venv | |
parent | ac6e4dd7b480e83b586ef533d7b29a8a97eb48fe (diff) | |
download | nnfw-3ad689f0803519e343c36d5700646e86059df961.tar.gz nnfw-3ad689f0803519e343c36d5700646e86059df961.tar.bz2 nnfw-3ad689f0803519e343c36d5700646e86059df961.zip |
Imported Upstream version 1.20.0upstream/1.20.0submit/tizen/20220415.103159
Diffstat (limited to 'compiler/one-cmds/one-prepare-venv')
-rw-r--r-- | compiler/one-cmds/one-prepare-venv | 39 |
1 files changed, 27 insertions, 12 deletions
diff --git a/compiler/one-cmds/one-prepare-venv b/compiler/one-cmds/one-prepare-venv index 285191761..0f75166a7 100644 --- a/compiler/one-cmds/one-prepare-venv +++ b/compiler/one-cmds/one-prepare-venv @@ -26,16 +26,17 @@ VENV_PYTHON=${DRIVER_PATH}/venv/bin/python if [ ! -f ${VENV_ACTIVATE} ]; then # Create python virtual enviornment - python3 -m venv "${DRIVER_PATH}/venv" + python3.8 -m venv "${DRIVER_PATH}/venv" fi # NOTE version # - https://github.com/onnx/onnx/blob/master/docs/Versioning.md # - https://github.com/onnx/onnx-tensorflow/blob/master/Versioning.md -VER_TENSORFLOW=2.3.0 -VER_ONNX=1.10.1 -VER_ONNX_TF=1.9.0 +VER_TENSORFLOW=2.8.0 +VER_ONNX=1.11.0 +VER_ONNXRUNTIME=1.11.0 +VER_ONNX_TF=1.10.0 # Install tensorflow @@ -54,18 +55,32 @@ if [[ ! -z "$ONE_PREPVENV_PIP_OPTION" ]]; then PIP_OPTIONS+=" ${ONE_PREPVENV_PIP_OPTION} " fi -# TODO remove version number of 'pip==20.2.1 setuptools==49.3.0' -# NOTE adding version is for temporary hotfix of setuptools 50.x.y version -${VENV_PYTHON} -m pip ${PIP_OPTIONS} install -U pip==20.2.1 setuptools==49.3.0 -${VENV_PYTHON} -m pip ${PIP_OPTIONS} install tensorflow-cpu==${VER_TENSORFLOW} -${VENV_PYTHON} -m pip ${PIP_OPTIONS} install Pillow==6.2.2 +${VENV_PYTHON} -m pip ${PIP_OPTIONS} install --upgrade pip setuptools +if [ -n "${EXT_TENSORFLOW_WHL}" ]; then + ${VENV_PYTHON} -m pip ${PIP_OPTIONS} install ${EXT_TENSORFLOW_WHL} +else + ${VENV_PYTHON} -m pip ${PIP_OPTIONS} install tensorflow-cpu==${VER_TENSORFLOW} +fi +${VENV_PYTHON} -m pip ${PIP_OPTIONS} install Pillow +${VENV_PYTHON} -m pip ${PIP_OPTIONS} install tensorflow_probability # Install PyTorch and ONNX related -${VENV_PYTHON} -m pip ${PIP_OPTIONS} install torch==1.8.1+cpu -f https://download.pytorch.org/whl/torch_stable.html +# NOTE set ONE_PREPVENV_TORCH_STABLE to override 'torch_stable.html' URL. +# torch_stable.html points to download URL of torch wheel file(s) +# but sometimes the server gets unstable, especially from in-house CI. +TORCH_STABLE_URL="https://download.pytorch.org/whl/torch_stable.html" +if [[ ! -z "$ONE_PREPVENV_TORCH_STABLE" ]]; then + TORCH_STABLE_URL="${ONE_PREPVENV_TORCH_STABLE}" +fi +${VENV_PYTHON} -m pip ${PIP_OPTIONS} install torch==1.11.0+cpu -f ${TORCH_STABLE_URL} + +${VENV_PYTHON} -m pip ${PIP_OPTIONS} install onnx==${VER_ONNX} + +${VENV_PYTHON} -m pip ${PIP_OPTIONS} install onnxruntime==${VER_ONNXRUNTIME} # Provide install of custom onnx-tf if [ -n "${EXT_ONNX_TF_WHL}" ]; then - ${VENV_PYTHON} -m pip ${PIP_OPTIONS} install onnx==${VER_ONNX} ${EXT_ONNX_TF_WHL} + ${VENV_PYTHON} -m pip ${PIP_OPTIONS} install ${EXT_ONNX_TF_WHL} else - ${VENV_PYTHON} -m pip ${PIP_OPTIONS} install onnx==${VER_ONNX} onnx-tf==${VER_ONNX_TF} + ${VENV_PYTHON} -m pip ${PIP_OPTIONS} install onnx-tf==${VER_ONNX_TF} fi |