Skip to content

Commit

Permalink
add example for the pyflink intro blog post (#35)
Browse files Browse the repository at this point in the history
* add example for the pyflink intro blog post

* update READMEs

* update to multi-arch container image
  • Loading branch information
hpgrahsl authored Feb 5, 2025
1 parent 15d51a5 commit 1c2d017
Show file tree
Hide file tree
Showing 21 changed files with 922 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ _Decodable provides a managed PyFlink service. Learn more [here](https://docs.de
| [PyFlink](pyflink) | Running a basic PyFlink job on Kubernetes |
| [PyFlink on Decodable](pyflink-decodable) | Running a PyFlink job as a Custom Pipeline on Decodable |
| [PyFlink and MongoDB Vector Search](pyflink-vector-embeddings) | End-to-end example for PyFlink Vector Ingestion on Decodable with MongoDB Vector Search |
| [PyFlink Intro](pyflink-intro) | A Hands-On Introduction to PyFlink |

### Integrations

Expand Down
17 changes: 17 additions & 0 deletions pyflink-intro/.devcontainer/Containerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
FROM mcr.microsoft.com/devcontainers/python:1-3.11-bullseye

RUN apt-get update && apt-get install -y curl zip unzip && rm -rf /var/lib/apt/lists/*

USER 1000:1000
WORKDIR /home/vscode

RUN curl -s "https://get.sdkman.io" | bash
SHELL ["/bin/bash", "-c"]
RUN source "/home/vscode/.sdkman/bin/sdkman-init.sh" \
&& sdk install java 17.0.14-tem \
&& sdk flush

RUN export JAVA_HOME=/home/vscode/.sdkman/candidates/java/current \
&& pip install apache-flink==1.20.0

RUN pip install sentence-transformers==3.4.0 langchain-community==0.3.16 langchain-huggingface==0.1.2 langchain-text-splitters==0.3.5
10 changes: 10 additions & 0 deletions pyflink-intro/.devcontainer/compose.dev.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name: pyflink-intro
services:
pyflink-app-dev:
hostname: pyflink-app-dev
image: hpgrahsl/pyflink-app-dev:1.1
volumes:
- ./:/home/vscode/workspaces/:cached
command: sleep infinity
networks:
- demo-network
16 changes: 16 additions & 0 deletions pyflink-intro/.devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"name": "pyflink-app-dev",
"dockerComposeFile": [
"../compose.yaml",
"./compose.dev.yaml"
],
"service": "pyflink-app-dev",
"shutdownAction": "stopCompose",
"workspaceFolder": "/home/vscode/workspaces/",
"containerEnv": {
"JAVA_HOME": "/home/vscode/.sdkman/candidates/java/current"
},
"remoteEnv": {
"PATH":"${containerEnv:PATH}:${containerEnv:JAVA_HOME}/bin"
}
}
Loading

0 comments on commit 1c2d017

Please sign in to comment.