Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rocAL - python package improvisation wrt installation #622

Merged
merged 11 commits into from
Sep 17, 2021
Merged
4 changes: 2 additions & 2 deletions rocAL/rocAL_pybind/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ written primarily in C/C++ language can be used effectively in Python.
* PIP3 - `sudo apt install python3-pip`

## Install
Install rali_pybind using the run.sh script (for all except conda environment)
Install rocAL_pybind using the run.sh script
```
sudo ./run.sh
./run.sh
```
NOTE: If using conda environment, use:
```
Expand Down
23 changes: 17 additions & 6 deletions rocAL/rocAL_pybind/run.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
rm -r /usr/local/lib/python3.6/dist-packages/amd_rali-1.1.0-py3.6-linux-x86_64.egg
rm -r ./amd_rali.egg-info/
rm -r ./build
rm -r ./dist
python3.6 setup.py build
python3.6 setup.py install
#!/bin/bash

DEFAULT_PYTHON=$(which python3.6) ## Gets the default python
CONDA="conda"
if [ -n "$CONDA_DEFAULT_ENV" ] || [ -n "$VIRTUAL_ENV" ] || [[ "$DEFAULT_PYTHON" == *"$CONDA"* ]]; then ## Checks if it is in any env then removes packages accordingly
PYTHON_LIB_PATH=${DEFAULT_PYTHON/bin/lib}
EGG_FILE_PATH="/site-packages/amd_rali-1.1.0-py3.6-linux-x86_64.egg"
ROCAL_PYTHON_LIB_PATH=$PYTHON_LIB_PATH$EGG_FILE_PATH
sudo rm -r "$ROCAL_PYTHON_LIB_PATH"
else
sudo rm -r /usr/local/lib/python3.6/dist-packages/amd_rali-1.1.0-py3.6-linux-x86_64.egg
fi
sudo rm -r ./amd_rali.egg-info/
sudo rm -r ./build
sudo rm -r ./dist
sudo "$DEFAULT_PYTHON" setup.py build
sudo "$DEFAULT_PYTHON" setup.py install