From 478d41185c80feda5fe66287292cecfaf8c63ad4 Mon Sep 17 00:00:00 2001 From: mintesin Date: Sun, 3 Aug 2025 18:39:05 +0200 Subject: [PATCH] some additional code snippet added --- .dockerignore | 34 ++++++++++++++++++++++++++++++++++ Application.py | 8 ++++++++ Dockerfile | 23 +++++++++++++++++++++++ Server.py | 0 requirements.txt | 10 ++++++++++ 5 files changed, 75 insertions(+) create mode 100644 .dockerignore create mode 100644 Application.py create mode 100644 Dockerfile create mode 100644 Server.py create mode 100644 requirements.txt diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..03a268b --- /dev/null +++ b/.dockerignore @@ -0,0 +1,34 @@ +# Include any files or directories that you don't want to be copied to your +# container here (e.g., local build artifacts, temporary files, etc.). +# +# For more help, visit the .dockerignore file reference guide at +# https://docs.docker.com/go/build-context-dockerignore/ + +**/.DS_Store +**/__pycache__ +**/.venv +**/.classpath +**/.dockerignore +**/.env +**/.git +**/.gitignore +**/.project +**/.settings +**/.toolstarget +**/.vs +**/.vscode +**/*.*proj.user +**/*.dbmdl +**/*.jfm +**/bin +**/charts +**/docker-compose* +**/compose.y*ml +**/Dockerfile* +**/node_modules +**/npm-debug.log +**/obj +**/secrets.dev.yaml +**/values.dev.yaml +LICENSE +README.md diff --git a/Application.py b/Application.py new file mode 100644 index 0000000..8041892 --- /dev/null +++ b/Application.py @@ -0,0 +1,8 @@ +from worker.DataSerializer import DataSerializer +from worker.HadoopManager import HadoopManager + + +# function main(): +# data_serializer = DataSerializer("data_path must be passed here") + + diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..b3c7e4c --- /dev/null +++ b/Dockerfile @@ -0,0 +1,23 @@ +# Dockerfile +FROM python:3.11-slim + + +WORKDIR /app + +COPY wait-for-namenode.sh /wait-for-namenode.sh + +RUN chmod +x /wait-for-namenode.sh + +ENTRYPOINT ["/wait-for-namenode.sh"] + + +COPY . . + +RUN pip install --timeout=120 hdfs +RUN pip install --timeout=120 pandas +RUN pip install --timeout=120 pyspark + + + + +CMD ["python", "worker/try.py"] diff --git a/Server.py b/Server.py new file mode 100644 index 0000000..e69de29 diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..8a90184 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,10 @@ +jupyter +pyspark +fastapi + +hdfs +kazoo +uvicorn + + +