Skip to content

open-ce/open-ce-python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Open-CE-Python Stars

Open-CE Logo

Python Support Architecture Support GitHub Licence

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

GETTING STARTED

Requirements

  • conda

  • Redhat GCC 12 Redhat's gcc-toolset-12 package is needed which can be installed via yum install -y gcc-toolset-12.

  • System/OS RHEL 8.x with Power 9 or Power 10 architecture is required.

Building Open-CE Python

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

Using Open-CE python with other Open-CE packages

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 -

  1. 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.

  1. Activate the conda environment
    conda activate <conda env name>
  1. 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>
  1. 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
  1. 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.

Contributions

For contribution information, please see the CONTRIBUTING.md page.

Slack Community

Join us on Slack! Use this link or ping the @open-ce/open-ce-dev-team for an invite.