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

[doc] Add a Chinese version documentation & Fix a bug while building website locally. #258

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions docs/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -71,3 +71,14 @@ pygmentsUseClasses = true
[markup]
[markup.goldmark.renderer]
unsafe = true

[languages]
[languages.en]
languageName = 'English'
contentDir = 'content'
weight = 1

[languages.zh]
languageName = '中文版'
contentDir = 'content.zh'
weight = 2
51 changes: 51 additions & 0 deletions docs/content.zh/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
---
title: Apache Flink Machine Learning Library
type: docs
bookToc: false
---
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->

# Flink ML: Apache Flink Machine Learning Library

Flink ML is a library which provides machine learning (ML) APIs and
infrastructures that simplify the building of ML pipelines. Users can implement
ML algorithms with the standard ML APIs and further use these infrastructures to
build ML pipelines for both training and inference jobs.

{{< columns >}}
## Try Flink ML

If you’re interested in playing around with Flink ML, check out our [quick
start]({{< ref "docs/try-flink-ml/java/quick-start" >}}). It provides a simple
example to submit and execute a Flink ML job on a Flink cluster.

<--->

## Get Help with Flink ML

If you get stuck, check out our [community support
resources](https://flink.apache.org/community.html). In particular, Apache
Flink’s user mailing list is consistently ranked as one of the most active of
any Apache project, and is a great way to get help quickly.

{{< /columns >}}

Flink ML is developed under the umbrella of [Apache
Flink](https://flink.apache.org/).
26 changes: 26 additions & 0 deletions docs/content.zh/docs/development/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
title: Development
icon: <i class="fa fa-code title maindish" aria-hidden="true"></i>
bold: true
sectionBreak: true
bookCollapseSection: true
weight: 2
---
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
111 changes: 111 additions & 0 deletions docs/content.zh/docs/development/build-and-install.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
---
title: "Building And Installing Flink ML From Source"
weight: 999
type: docs
aliases:
- /development/build-and-install.html

---

<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->

# Building And Installing Flink ML From Source

This page covers how to build and install Flink ML from sources.

## Build and Install Java SDK

In order to build Flink ML you need the source code. Either [download the source
of a release](https://flink.apache.org/downloads.html) or [clone the git
repository](https://github.com/apache/flink-ml.git).

In addition, you need **Maven 3** and a **JDK** (Java Development Kit). Flink ML
requires **at least Java 8** to build.

To clone from git, enter:

```bash
git clone https://github.com/apache/flink-ml.git
```

The simplest way of building Flink ML is by running:

```bash
mvn clean install -DskipTests
```

This instructs [Maven](http://maven.apache.org/) (`mvn`) to first remove all
existing builds (`clean`) and then create a new Flink ML binary (`install`).

Optionally, you can also specify the Flink version used by Flink ML with maven
profile. Currently, Flink ML supports running on Flink 1.15, 1.16, and 1.17.
For example, you can build Flink ML with Flink 1.16 by running:
```bash
mvn clean install -DskipTests -Pflink-1.16
```

After the build finishes, you can acquire the build result in the following path
from the root directory of Flink ML:

```
./flink-ml-dist/target/flink-ml-*-bin/flink-ml*/
```

The `mvn clean install` command would have installed the binary into your local
Maven repository so other projects can refer to it and grab it from the
repository. There is no additional step required for installation.

## Build and Install Python SDK

### Prerequisites

1. Building Flink ML Java SDK

If you want to build Flink ML's Python SDK that can be used for pip
installation, you must first build the Java SDK, as described in the section
above.

2. Python version(3.7, or 3.8) is required
```shell
$ python --version
# the version printed here must be 3.7 or 3.8
```

3. Install the dependencies with the following command:
```shell
$ python -m pip install -r flink-ml-python/dev/dev-requirements.txt
```

### Installation

Then go to the root directory of Flink ML source code and run this command to
build the sdist package of `apache-flink-ml`:

```shell
cd flink-ml-python; python setup.py sdist; cd ..;
```

The sdist package of `apache-flink-ml` will be found under
`./flink-ml-python/dist/`. It could be installed as follows:

```shell
python -m pip install flink-ml-python/dist/*.tar.gz
```

Loading