Skip to content

Commit

Permalink
[one-cmds] Remove virtualenv installation command (Samsung#7219)
Browse files Browse the repository at this point in the history
* [one-cmds] Remove virtualenv installation command

This commit removes virtualenv installation command.

ONE-DCO-1.0-Signed-off-by: seongwoo <[email protected]>

* remove error_no_ensurepip function

* remove empty line.
  • Loading branch information
mhs4670go authored Jul 14, 2021
1 parent b96857e commit 1bae733
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions compiler/one-cmds/one-prepare-venv
Original file line number Diff line number Diff line change
Expand Up @@ -24,26 +24,11 @@ VENV_ACTIVATE=${DRIVER_PATH}/venv/bin/activate
# Since debian maintainer script is called with sudo, `source activation` is ignored.
VENV_PYTHON=${DRIVER_PATH}/venv/bin/python

function error_no_ensurepip ()
{
echo "ERROR: python3 'ensurepip' module is not found."
echo " On ubuntu, try following command:"
echo
echo " apt install python$(python3 --version | awk '{print $2}' | awk -F. '{print $1"."$2}')-venv"
echo
echo " You may need root privilege for this."
exit 1
}

if [ ! -f ${VENV_ACTIVATE} ]; then
# Install prerequisites
python3 -m ensurepip --version > /dev/null 2>&1 || error_no_ensurepip
python3 -m pip install --user -U virtualenv
# Create python virtual enviornment
python3 -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
Expand Down

0 comments on commit 1bae733

Please sign in to comment.