Update torch-mlir releases page in setup_venv.sh (#374)

* Update README.md

* Update setup_venv.sh
This commit is contained in:
Ean Garvey
2022-09-28 13:07:44 -05:00
committed by GitHub
parent 9035a2eed3
commit 56f8a0d85a
2 changed files with 3 additions and 10 deletions

View File

@@ -71,18 +71,11 @@ else
echo "${Red}OS not detected. Pray and Play"
fi
TM_HTML_URL="$(python3 -c "import urllib.request, json, sys; \
u=json.loads(urllib.request.urlopen('https://api.github.com/repos/llvm/torch-mlir/releases/latest').read().decode()).get('html_url', False);\
print(u) if u else sys.exit(1);")"
TM_RELEASE_DIR=${TM_HTML_URL/"tag"/"expanded_assets"}
echo "TM_HTML_URL=${TM_HTML_URL}"
echo "TM_RELEASE_DIR=${TM_RELEASE_DIR}"
# Upgrade pip and install requirements.
$PYTHON -m pip install --upgrade pip || die "Could not upgrade pip"
$PYTHON -m pip install --upgrade -r "$TD/requirements.txt"
if [ "$torch_mlir_bin" = true ]; then
$PYTHON -m pip install --find-links ${TM_RELEASE_DIR} torch-mlir --extra-index-url ${TM_RELEASE_DIR}
$PYTHON -m pip install --pre torch-mlir -f https://llvm.github.io/torch-mlir/package-index/
if [ $? -eq 0 ];then
echo "Successfully Installed torch-mlir"
else
@@ -117,7 +110,7 @@ if [[ ! -z "${IMPORTER}" ]]; then
fi
fi
$PYTHON -m pip install -e . -f ${TM_RELEASE_DIR} -f https://github.com/${RUNTIME}/releases
$PYTHON -m pip install -e . -f https://llvm.github.io/torch-mlir/package-index/ -f https://github.com/${RUNTIME}/releases
if [[ $(uname -s) = 'Linux' && ! -z "${IMPORTER}" ]]; then
$PYTHON -m pip uninstall -y torch torchvision