Skip to content

Commit b5e3aab

Browse files
author
Nishidha
authored
Merge pull request #3 from npanpaliya/Update-README
Update readme
2 parents 92492a3 + 27935f1 commit b5e3aab

1 file changed

Lines changed: 41 additions & 2 deletions

File tree

README.md

Lines changed: 41 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,52 @@ This repository contains an Open-CE environment file that builds optimized pytho
3333

3434
### Building Open-CE Python
3535

36-
Open-CE Python can be built like any other Open-CE package. This repository contains [envs/python-env.yaml](https://github.com/open-ce/open-ce-python/blob/main/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](https://github.com/open-ce/open-ce-builder).
36+
Open-CE Python can be built like any other Open-CE package. This repository contains [envs/python-env.yaml](https://github.com/open-ce/open-ce-python/blob/main/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](https://github.com/open-ce/open-ce-builder/blob/main/doc/README.open_ce_build.md).
3737

3838
For example:
3939
```shell
40-
open-ce build env --python_versions=3.10 --ppc_arch=p10 --build_type=cpu python-env.yaml
40+
open-ce build env --python_versions=3.10 --ppc_arch=p10 --output_folder=condabuild --build_type=cpu python-env.yaml
4141
```
4242

43+
### Using Open-CE python with other Open-CE packages
44+
45+
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 -
46+
47+
1. Create a new conda environment with optimized python built as mentioned in above section.
48+
```shell
49+
conda create -n <conda env name> python=3.10.9 -c file://<path to condabuild directory>
50+
```
51+
Here, `path to condabuild directory` means the path to `--output_folder` when python was built as per above section.
52+
If you have not specified `--output-folder` during the build, the directory will be `condabuild`.
53+
54+
2. Activate the conda environment
55+
```shell
56+
conda activate <conda env name>
57+
```
58+
59+
3. Confirm the source of python package in the environment
60+
```shell
61+
(<conda env name>)$ conda list python
62+
# packages in environment at $HOME/anaconda3/envs/<conda env name>:
63+
#
64+
# Name Version Build Channel
65+
python 3.10.9 hd70dfa7_0 file://<path to condabuild directory>
66+
```
67+
68+
4. Install Open-CE packages from any of the following channels -
69+
70+
* https://anaconda.org/rocketce/
71+
* https://ftp.osuosl.org/pub/open-ce/current/
72+
* https://opence.mit.edu/
73+
74+
For example:
75+
```shell
76+
conda install -y tensorflow-cpu libtensorflow onnx onnxruntime pytorch-cpu openblas -c rocketce
77+
```
78+
79+
5. Python Verification
80+
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.
81+
4382
## Contributions
4483

4584
For contribution information, please see the [CONTRIBUTING.md](https://github.com/open-ce/open-ce/blob/main/CONTRIBUTING.md) page.

0 commit comments

Comments
 (0)