You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by di...@apache.org on 2021/09/06 05:52:19 UTC
[flink] branch release-1.12 updated: [FLINK-24134][python][docs]
Update the documentation about how to install PyFlink in docker
This is an automated email from the ASF dual-hosted git repository.
dianfu pushed a commit to branch release-1.12
in repository https://gitbox.apache.org/repos/asf/flink.git
The following commit(s) were added to refs/heads/release-1.12 by this push:
new d802693 [FLINK-24134][python][docs] Update the documentation about how to install PyFlink in docker
d802693 is described below
commit d80269373b4ebf7ff36c0d7b96000cf23073504f
Author: Dian Fu <di...@apache.org>
AuthorDate: Mon Sep 6 13:50:27 2021 +0800
[FLINK-24134][python][docs] Update the documentation about how to install PyFlink in docker
This closes #17154.
---
.../deployment/resource-providers/standalone/docker.md | 18 ++++++++++++++++++
.../resource-providers/standalone/docker.zh.md | 18 ++++++++++++++++++
2 files changed, 36 insertions(+)
diff --git a/docs/deployment/resource-providers/standalone/docker.md b/docs/deployment/resource-providers/standalone/docker.md
index 5c5191c..aeaf781 100644
--- a/docs/deployment/resource-providers/standalone/docker.md
+++ b/docs/deployment/resource-providers/standalone/docker.md
@@ -325,6 +325,24 @@ RUN pip3 install apache-flink
{% endif %}
{% endhighlight %}
+<span class="label label-info">Note</span> For base image flink:1.12.5 or above (which is based on Debian 11
+in which Python has been updated to 3.9), Python 3 could be installed as following:
+{% highlight Dockerfile %}
+RUN apt-get update -y && \
+apt-get install -y build-essential libssl-dev zlib1g-dev libbz2-dev libffi-dev && \
+wget https://www.python.org/ftp/python/3.7.9/Python-3.7.9.tgz && \
+tar -xvf Python-3.7.9.tgz && \
+cd Python-3.7.9 && \
+./configure --without-tests --enable-shared && \
+make -j6 && \
+make install && \
+ldconfig /usr/local/lib && \
+cd .. && rm -f Python-3.7.9.tgz && rm -rf Python-3.7.9 && \
+ln -s /usr/local/bin/python3 /usr/local/bin/python && \
+apt-get clean && \
+rm -rf /var/lib/apt/lists/*
+{% endhighlight %}
+
Build the image named as **pyflink:latest**:
{% highlight bash %}
diff --git a/docs/deployment/resource-providers/standalone/docker.zh.md b/docs/deployment/resource-providers/standalone/docker.zh.md
index fea2784..ae85f94 100644
--- a/docs/deployment/resource-providers/standalone/docker.zh.md
+++ b/docs/deployment/resource-providers/standalone/docker.zh.md
@@ -315,6 +315,24 @@ RUN pip3 install apache-flink
{% endif %}
{% endhighlight %}
+<span class="label label-info">Note</span> For base image flink:1.12.5 or above (which is based on Debian 11
+in which Python has been updated to 3.9), Python 3 could be installed as following:
+{% highlight Dockerfile %}
+RUN apt-get update -y && \
+apt-get install -y build-essential libssl-dev zlib1g-dev libbz2-dev libffi-dev && \
+wget https://www.python.org/ftp/python/3.7.9/Python-3.7.9.tgz && \
+tar -xvf Python-3.7.9.tgz && \
+cd Python-3.7.9 && \
+./configure --without-tests --enable-shared && \
+make -j6 && \
+make install && \
+ldconfig /usr/local/lib && \
+cd .. && rm -f Python-3.7.9.tgz && rm -rf Python-3.7.9 && \
+ln -s /usr/local/bin/python3 /usr/local/bin/python && \
+apt-get clean && \
+rm -rf /var/lib/apt/lists/*
+{% endhighlight %}
+
Build the image named as **pyflink:latest**:
{% highlight bash %}