Skip to content

Commit e9ae785

Browse files
committedJun 23, 2021
Updated dependencies for Python packaging and instructions.
1 parent e699cd0 commit e9ae785

File tree

7 files changed

+146
-29
lines changed

7 files changed

+146
-29
lines changed
 

‎README.md

+29-15
Original file line numberDiff line numberDiff line change
@@ -59,30 +59,30 @@ This project is under active development. See the [Documentation](https://codefl
5959

6060
### Run in your laptop
6161

62-
#### Installing locally
62+
#### Instaling locally
6363

6464
CodeFlare can be installed from PyPI.
6565

6666
Prerequisites:
6767
* [Python 3.8+](https://www.python.org/downloads/)
6868
* [JupyterLab](https://jupyter.org) *(to run examples)*
6969

70-
We recommend installing Python 3.8.7 using
71-
[pyenv](https://github.com/pyenv/pyenv).
70+
We recommend installing Python 3.8.6 using
71+
[pyenv](https://github.com/pyenv/pyenv). You can find [here](https://codeflare.readthedocs.io/en/latest/getting_started/setting_python_env.html) recommended steps to set up the Python environment.
7272

7373

74-
Install from PyPI:
75-
```bash
76-
pip3 install --upgrade codeflare
77-
```
7874

75+
Install from PyPI:
76+
```bash
77+
pip3 install --upgrade pip # CodeFlare requires pip >21.0
78+
pip3 install --upgrade codeflare
79+
```
7980

8081
Alternatively, you can also build locally with:
8182
```shell
8283
git clone https://github.com/project-codeflare/codeflare.git
8384
pip3 install --upgrade pip
8485
pip3 install .
85-
pip3 install -r requirements.txt
8686
```
8787

8888
#### Using Docker
@@ -114,28 +114,42 @@ Click on the link below to try CodeFlare, on a sandbox environment, without havi
114114

115115
[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/project-codeflare/codeflare.git/develop)
116116

117+
117118
## Pipeline execution and scaling
118119

119120
<p align="center">
120121
<img src="./images/pipelines.svg" width="296" height="180">
121122
</p>
122123

124+
## CodeFlare Pipelines
125+
123126
CodeFlare Pipelines reimagined pipelines to provide a more intuitive API for the data scientist to create AI/ML pipelines, data workflows, pre-processing, post-processing tasks, and many more which can scale from a laptop to a cluster seamlessly.
124127

125-
The API documentation can be found [here](https://codeflare.readthedocs.io/en/latest/codeflare.pipelines.html), and reference use case documentation [here](https://codeflare.readthedocs.io/en/latest).
128+
See the API documentation [here](https://codeflare.readthedocs.io/en/latest/codeflare.pipelines.html), and reference use case documentation in the Examples section.
126129

127-
Examples are provided as executable notebooks: [notebooks](./notebooks).
130+
Examples are provided as executable [notebooks](https://github.com/project-codeflare/codeflare/tree/main/notebooks).
128131

129-
Examples can be run with locally with:
132+
To run examples, if you haven't done so yet, clone the CodeFlare project with:
133+
134+
```bash
135+
git clone https://github.com/project-codeflare/codeflare.git
136+
```
137+
138+
Example notebooks require JupyterLab, which can be installed with:
139+
```bash
140+
pip3 install --upgrade jupyterlab
141+
```
142+
143+
Use the command below to run locally:
130144
```shell
131-
jupyter-lab notebooks/<example_notebook>
145+
jupyter-lab codeflare/notebooks/<example_notebook>
132146
```
133147

134-
If running with the container image, examples are found in `codeflare/notebooks`, which can be executed directly from Jupyter environment.
148+
The step above should automatically open a browser window and connect to a running Jupyter server.
135149

136-
As a first example, we recommend the [sample pipeline](https://github.com/project-codeflare/codeflare/blob/main/notebooks/sample_pipeline.ipynb).
150+
If you are using any one of the recommended cloud based deployments, examples are found in the `codeflare/notebooks` directory in the container image. The examples can be executed directly from the Jupyter environment.
137151

138-
The pipeline will use `ray.init()` to start a local Ray cluster. See the deployment options below to run a Ray cluster on in the cloud, or the details [here](https://docs.ray.io/en/master/configure.html) if you are running a Ray cluster locally.
152+
As a first example, we recommend the [sample pipeline](https://github.com/project-codeflare/codeflare/blob/main/notebooks/sample_pipeline.ipynb).
139153

140154
## Deploy and integrate anywhere
141155

‎codeflare/_version.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
#
16-
__version__ = '0.1.0.dev0'
16+
__version__ = '0.1.1.dev0'

‎deploy/redhat_openshift/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ We recommend installing Python 3.8.7 using
2828

2929
Install from PyPI:
3030
```bash
31+
pip3 install --upgrade pip # CodeFlare requires pip >21.0
3132
pip3 install --upgrade codeflare
3233
```
3334

@@ -36,7 +37,6 @@ Alternatively, you can also build locally with:
3637
git clone https://github.com/project-codeflare/codeflare.git
3738
pip3 install --upgrade pip
3839
pip3 install .
39-
pip3 install -r requirements.txt
4040
```
4141

4242
2. Create Cluster (https://docs.ray.io/en/master/cluster/cloud.html#kubernetes)

‎docs/source/getting_started/installation.md

+8-8
Original file line numberDiff line numberDiff line change
@@ -26,24 +26,24 @@ CodeFlare can be installed from PyPI.
2626

2727
Prerequisites:
2828
* [Python 3.8+](https://www.python.org/downloads/)
29-
* [Jupyter Lab](https://www.python.org/downloads/) *(to run examples)*
29+
* [JupyterLab](https://jupyter.org) *(to run examples)*
3030

31-
We recommend installing Python 3.8.7 using
32-
[pyenv](https://github.com/pyenv/pyenv).
31+
We recommend installing Python 3.8.6 using
32+
[pyenv](https://github.com/pyenv/pyenv). You can find [here](./setting_python_env.md) recommended steps to set up the Python environment.
3333

3434

35-
Install from PyPI:
36-
```bash
37-
pip3 install --upgrade codeflare
38-
```
3935

36+
Install from PyPI:
37+
```bash
38+
pip3 install --upgrade pip # CodeFlare requires pip >21.0
39+
pip3 install --upgrade codeflare
40+
```
4041

4142
Alternatively, you can also build locally with:
4243
```shell
4344
git clone https://github.com/project-codeflare/codeflare.git
4445
pip3 install --upgrade pip
4546
pip3 install .
46-
pip3 install -r requirements.txt
4747
```
4848

4949
#### Using Docker
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
<!--
2+
{% comment %}
3+
Copyright 2021 IBM
4+
5+
Licensed under the Apache License, Version 2.0 (the "License");
6+
you may not use this file except in compliance with the License.
7+
You may obtain a copy of the License at
8+
9+
http://www.apache.org/licenses/LICENSE-2.0
10+
11+
Unless required by applicable law or agreed to in writing, software
12+
distributed under the License is distributed on an "AS IS" BASIS,
13+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
See the License for the specific language governing permissions and
15+
limitations under the License.
16+
{% endcomment %}
17+
-->
18+
19+
[pyenv](https://github.com/pyenv/pyenv) is a tool that can be used to easily enable and switch between multiple versions of Python.
20+
21+
It can be installing with:
22+
23+
[MacOS]
24+
25+
1. Install via Homebrew
26+
27+
pyenv can be installed with [Homebrew](https://brew.sh) with the following command:
28+
29+
```bash
30+
# Requires admin privileges
31+
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
32+
```
33+
34+
*Note:* If you don't have Xcode Command Line installed yet, this step will request confirmation and install it.
35+
36+
2. Install pyenv:
37+
38+
```bash
39+
brew install pyenv
40+
```
41+
42+
3. Install Python (CodeFlare has been tested with 3.8.6):
43+
44+
```bash
45+
pyenv install 3.8.6
46+
```
47+
48+
4. Set global default:
49+
```bash
50+
pyenv global 3.8.6
51+
```
52+
and verify it worked:
53+
54+
```bash
55+
pyenv version
56+
3.8.6 (set by /Users/<user>/.pyenv/version)
57+
```
58+
59+
5. Set up shell path:
60+
61+
Add the following to your `~/.bash_profile` (*Note*: the you may have to create the the file)
62+
63+
```bash
64+
export PYENV_ROOT="$HOME/.pyenv"
65+
export PATH="$PYENV_ROOT/bin:$PATH"
66+
eval "$(pyenv init --path)"
67+
68+
eval "$(pyenv init -)"
69+
```
70+
71+
You will have to source your profile for changes to take affect:
72+
73+
```bash
74+
source ~/.bash_profile
75+
```
76+
77+
6. Confirm Python version
78+
79+
```bash
80+
python --version
81+
Python 3.8.6
82+
```
83+

‎docs/source/pipelines/pipelines_overview.md

+16-3
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,24 @@ See the API documentation [here](https://codeflare.readthedocs.io/en/latest/code
2626

2727
Examples are provided as executable [notebooks](https://github.com/project-codeflare/codeflare/tree/main/notebooks).
2828

29-
Notebooks can can be run with locally with:
29+
To run examples, if you haven't done so yet, clone the CodeFlare project with:
30+
31+
```bash
32+
git clone https://github.com/project-codeflare/codeflare.git
33+
```
34+
35+
Example notebooks require JupyterLab, which can be installed with:
36+
```bash
37+
pip3 install --upgrade jupyterlab
38+
```
39+
40+
Use the command below to run locally:
3041
```shell
31-
jupyter-lab notebooks/<example_notebook>
42+
jupyter-lab codeflare/notebooks/<example_notebook>
3243
```
3344

34-
Or, if using any of the recommended cloud based deployments, examples are found in `codeflare/notebooks`, which can be executed directly from Jupyter environment.
45+
The step above should automatically open a browser window and connect to a running Jupyter server.
46+
47+
If you are using any one of the recommended cloud based deployments, examples are found in the `codeflare/notebooks` directory in the container image. The examples can be executed directly from the Jupyter environment.
3548

3649
As a first example, we recommend the [sample pipeline](https://github.com/project-codeflare/codeflare/blob/main/notebooks/sample_pipeline.ipynb).

‎setup.py

+8-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,14 @@
3939
version=version_ns['__version__'],
4040
packages=['codeflare', 'codeflare.pipelines', 'codeflare.pipelines.tests'],
4141
install_requires=[
42-
'ray[default,serve,k8s]>=1.3.0'
42+
'ray[default,serve,k8s]>=1.3.0',
43+
'setuptools>=52.0.0',
44+
'sklearn>=0.0',
45+
'scikit-learn>=0.24.1',
46+
'pandas>=1.2.4',
47+
'numpy>=1.18.5',
48+
'pickle5>=0.0.11',
49+
'graphviz>=0.16',
4350
],
4451
url='https://github.com/project-codeflare/codeflare',
4552
license='Apache v2.0',

0 commit comments

Comments
 (0)
Please sign in to comment.