mirror of
https://github.com/nod-ai/SHARK-Studio.git
synced 2026-01-08 21:38:04 -05:00
Update torch-mlir releases page in setup_venv.sh (#374)
* Update README.md * Update setup_venv.sh
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user