This is a sub-project of the Open-CE project for building python specifically optimized for Power10 architecture.
This repository contains an Open-CE environment file that builds optimized python using the python feedstock. Open-CE Python currently supports the following:
Supported Versions | |
---|---|
Architecture | Power |
Python | 3.11 |
-
conda
-
Redhat GCC 12
Redhat'sgcc-toolset-12
package is needed which can be installed viayum install -y gcc-toolset-12
. -
System/OS
RHEL 8.x with Power 9 or Power 10 architecture is required.
Open-CE Python can be built like any other Open-CE package. This repository contains envs/python-env.yaml which is to be used to build optimized python. The open-ce
tool can be used to build this python. For more information on the open-ce
tool, please see the Open-CE Builder repository.
For example:
open-ce build env --python_versions=3.11 --ppc_arch=p10 --output_folder=condabuild --build_type=cpu python-env.yaml
One can use Open-CE packages along with the optimized Open-CE Python. Following are the steps to setup Open-CE Python and Open-CE packages in a single conda environment -
- Create a new conda environment with optimized python built as mentioned in above section.
conda create -n <conda env name> python=3.11.8 -c file://<path to condabuild directory>
Here, path to condabuild directory
means the path to --output_folder
when python was built as per above section.
If you have not specified --output-folder
during the build, the directory will be condabuild
.
- Activate the conda environment
conda activate <conda env name>
- Confirm the source of python package in the environment
(<conda env name>)$ conda list python
# packages in environment at $HOME/anaconda3/envs/<conda env name>:
#
# Name Version Build Channel
python 3.11.8 hd70dfa7_0 file://<path to condabuild directory>
-
Install Open-CE packages from any of the following channels -
For example:
conda install -y tensorflow-cpu libtensorflow onnx onnxruntime pytorch-cpu openblas -c rocketce
- Python Verification
When you're done with the package installation, run
(<conda env name>)$ conda list python
again to ensure that the python installed in the conda environment is not updated/replaced by any other python source like Anaconda.
For contribution information, please see the CONTRIBUTING.md page.
Join us on Slack! Use this link or ping the @open-ce/open-ce-dev-team for an invite.