Skip to content
Merged
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
18 changes: 9 additions & 9 deletions technologies/job/spark/metadata.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ contexts:
dockerInfo:
image: "saagie/spark"
baseTag: "2.4-py-3.7"
version: "2.4-py-3.7-1.170.0"
version: "2.4-py-3.7-1.194.0_sparkWithoutMinio"
- id: "3.0"
label: "3.0"
available: true
Expand Down Expand Up @@ -150,7 +150,7 @@ contexts:
dockerInfo:
image: "saagie/spark"
baseTag: "3.0-py-3.7"
version: "3.0-py-3.7-1.139.0"
version: "3.0-py-3.7-1.194.0_sparkWithoutMinio"
- id: "3.1"
label: "3.1"
available: true
Expand Down Expand Up @@ -221,7 +221,7 @@ contexts:
dockerInfo:
image: "saagie/spark"
baseTag: "3.1-py-3.7"
version: "3.1-py-3.7-1.139.0"
version: "3.1-py-3.7-1.194.0_sparkWithoutMinio"
- id: "3.8"
label: "3.8"
available: true
Expand All @@ -230,7 +230,7 @@ contexts:
dockerInfo:
image: "saagie/spark"
baseTag: "3.1-py-3.8"
version: "3.1-py-3.8-1.139.0"
version: "3.1-py-3.8-1.194.0_sparkWithoutMinio"
- id: "3.9"
label: "3.9"
available: true
Expand All @@ -239,7 +239,7 @@ contexts:
dockerInfo:
image: "saagie/spark"
baseTag: "3.1-py-3.9"
version: "3.1-py-3.9-1.139.0"
version: "3.1-py-3.9-1.194.0_sparkWithoutMinio"
- id: "3.5"
label: "3.5"
available: true
Expand Down Expand Up @@ -314,7 +314,7 @@ contexts:
dockerInfo:
image: "saagie/spark"
baseTag: "3.5-py-3.12"
version: "3.5-py-3.12-1.190.0"
version: "3.5-py-3.12-1.194.0_sparkWithoutMinio"
- id: 3.1-aws
label: 3.1 AWS
available: true
Expand Down Expand Up @@ -385,7 +385,7 @@ contexts:
dockerInfo:
image: "saagie/spark"
baseTag: "3.1-aws-py-3.7"
version: "3.1-aws-py-3.7-1.139.0"
version: "3.1-aws-py-3.7-1.194.0_sparkWithoutMinio"
- id: "3.8"
label: "3.8"
available: true
Expand All @@ -394,7 +394,7 @@ contexts:
dockerInfo:
image: "saagie/spark"
baseTag: "3.1-aws-py-3.8"
version: "3.1-aws-py-3.8-1.139.0"
version: "3.1-aws-py-3.8-1.194.0_sparkWithoutMinio"
- id: "3.9"
label: "3.9"
available: true
Expand All @@ -403,4 +403,4 @@ contexts:
dockerInfo:
image: "saagie/spark"
baseTag: "3.1-aws-py-3.9"
version: "3.1-aws-py-3.9-1.139.0"
version: "3.1-aws-py-3.9-1.194.0_sparkWithoutMinio"
41 changes: 10 additions & 31 deletions technologies/job/spark/spark-2.4/innerContexts/python/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,40 +44,19 @@ if [ -n "$SPARK_EXTRA_CLASSPATH" ]; then
SPARK_CLASSPATH="$SPARK_CLASSPATH:$SPARK_EXTRA_CLASSPATH"
fi

# BEGIN SAAGIE SPECIFIC CODE
cd /sandbox
# parse content and if pyfiles extract minio url and inject it
if [ -f main_script ] && grep -q "\--py-files" main_script;
if [ -f *.zip ]
then
PYSPARK_FILES="`grep -Po '.*--py-files=\K[^ ]+' main_script`"
fi;

if [ -n "$PYSPARK_FILES" ]; then
PYTHONPATH="$PYTHONPATH:$PYSPARK_FILES"
#Copy and unzip pyfiles
if [[ $PYSPARK_FILES == *[,]* ]];then
echo "PYSPARK_FILES contains comma"
pyfiles=$(echo $PYSPARK_FILES | tr "," "\n")

for file in $pyfiles
do
echo ">>> [$file]"
wget -nv $file
done
else
echo ">>> [$PYSPARK_FILES]"
wget -nv $PYSPARK_FILES
fi
if [ -f *.zip ]
then
unzip -q *.zip
fi
if [ -f "requirements.txt" ]
then
pip install -r requirements.txt
fi
rm -Rf /opt/spark/work-dir
ln -s /sandbox/ /opt/spark/work-dir
unzip -q *.zip
fi
if [ -f "requirements.txt" ]
then
pip install -r requirements.txt
fi
rm -Rf /opt/spark/work-dir
ln -s /sandbox/ /opt/spark/work-dir
# END SAAGIE SPECIFIC CODE

PYSPARK_ARGS=""
if [ -n "$PYSPARK_APP_ARGS" ]; then
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
12/10/2023
28/03/2025
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
image: saagie/spark
baseTag: 2.4-py-3.7
dynamicVersion: 1.170.0_SDKTECHNO-246
version: 2.4-py-3.7-1.170.0
dynamicVersion: 1.194.0_sparkWithoutMinio
version: 2.4-py-3.7-1.194.0_sparkWithoutMinio
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ fileContentTests:
expectedContents:
[
'exec /sbin/tini -s -- ',
'wget -nv \$PYSPARK_FILES',
'unzip -q \*\.zip',
'ln -s /sandbox/ /opt/spark/work-dir',
'--py-files=/sandbox/\*'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,39 +38,16 @@ fi

# BEGIN SAAGIE SPECIFIC CODE
cd /sandbox
# parse content and if pyfiles extract minio url and inject it
if [ -f main_script ] && grep -q "\--py-files" main_script;
if [ -f *.zip ]
then
PYSPARK_FILES="`grep -Po '.*--py-files=\K[^ ]+' main_script`"
fi;

if [ -n "$PYSPARK_FILES" ]; then
PYTHONPATH="$PYTHONPATH:$PYSPARK_FILES"
#Copy and unzip pyfiles
if [[ $PYSPARK_FILES == *[,]* ]];then
echo "PYSPARK_FILES contains comma"
pyfiles=$(echo $PYSPARK_FILES | tr "," "\n")

for file in $pyfiles
do
echo ">>> [$file]"
wget -nv $file
done
else
echo ">>> [$PYSPARK_FILES]"
wget -nv $PYSPARK_FILES
fi
if [ -f *.zip ]
then
unzip -q *.zip
fi
if [ -f "requirements.txt" ]
then
pip install -r requirements.txt
fi
rm -Rf /opt/spark/work-dir
ln -s /sandbox/ /opt/spark/work-dir
unzip -q *.zip
fi
if [ -f "requirements.txt" ]
then
pip install -r requirements.txt
fi
rm -Rf /opt/spark/work-dir
ln -s /sandbox/ /opt/spark/work-dir
# END SAAGIE SPECIFIC CODE


Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
04/11/2021
28/03/2025
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
image: saagie/spark
baseTag: 3.0-py-3.7
dynamicVersion: 1.139.0_SDKTECHNO-207
version: 3.0-py-3.7-1.139.0
dynamicVersion: 1.194.0_sparkWithoutMinio
version: 3.0-py-3.7-1.194.0_sparkWithoutMinio
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ fileContentTests:
path: "/opt/entrypoint.sh"
expectedContents:
[
'wget -nv \$PYSPARK_FILES',
'unzip -q \*\.zip',
'ln -s /sandbox/ /opt/spark/work-dir',
'--py-files=/sandbox/\*',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,39 +38,16 @@ fi

# BEGIN SAAGIE SPECIFIC CODE
cd /sandbox
# parse content and if pyfiles extract minio url and inject it
if [ -f main_script ] && grep -q "\--py-files" main_script;
if [ -f *.zip ]
then
PYSPARK_FILES="`grep -Po '.*--py-files=\K[^ ]+' main_script`"
fi;

if [ -n "$PYSPARK_FILES" ]; then
PYTHONPATH="$PYTHONPATH:$PYSPARK_FILES"
#Copy and unzip pyfiles
if [[ $PYSPARK_FILES == *[,]* ]];then
echo "PYSPARK_FILES contains comma"
pyfiles=$(echo $PYSPARK_FILES | tr "," "\n")

for file in $pyfiles
do
echo ">>> [$file]"
wget -nv $file
done
else
echo ">>> [$PYSPARK_FILES]"
wget -nv $PYSPARK_FILES
fi
if [ -f *.zip ]
then
unzip -q *.zip
fi
if [ -f "requirements.txt" ]
then
pip install -r requirements.txt
fi
rm -Rf /opt/spark/work-dir
ln -s /sandbox/ /opt/spark/work-dir
unzip -q *.zip
fi
if [ -f "requirements.txt" ]
then
pip install -r requirements.txt
fi
rm -Rf /opt/spark/work-dir
ln -s /sandbox/ /opt/spark/work-dir
# END SAAGIE SPECIFIC CODE


Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
12/12/2022
28/03/2025
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
image: saagie/spark
baseTag: 3.1-py-3.7
dynamicVersion: 1.139.0_SDKTECHNO-207
version: 3.1-py-3.7-1.139.0
dynamicVersion: 1.194.0_sparkWithoutMinio
version: 3.1-py-3.7-1.194.0_sparkWithoutMinio
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ fileContentTests:
path: "/opt/entrypoint.sh"
expectedContents:
[
'wget -nv \$PYSPARK_FILES',
'unzip -q \*\.zip',
'ln -s /sandbox/ /opt/spark/work-dir',
'--py-files=/sandbox/\*',
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
04/11/2021
28/03/2025
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
image: saagie/spark
baseTag: 3.1-py-3.8
dynamicVersion: 1.139.0_SDKTECHNO-207
version: 3.1-py-3.8-1.139.0
dynamicVersion: 1.194.0_sparkWithoutMinio
version: 3.1-py-3.8-1.194.0_sparkWithoutMinio
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ fileContentTests:
path: "/opt/entrypoint.sh"
expectedContents:
[
'wget -nv \$PYSPARK_FILES',
'unzip -q \*\.zip',
'ln -s /sandbox/ /opt/spark/work-dir',
'--py-files=/sandbox/\*',
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
04/11/2021
28/03/2025
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
image: saagie/spark
baseTag: 3.1-py-3.9
dynamicVersion: 1.139.0_SDKTECHNO-207
version: 3.1-py-3.9-1.139.0
dynamicVersion: 1.194.0_sparkWithoutMinio
version: 3.1-py-3.9-1.194.0_sparkWithoutMinio
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ fileContentTests:
path: "/opt/entrypoint.sh"
expectedContents:
[
'wget -nv \$PYSPARK_FILES',
'unzip -q \*\.zip',
'ln -s /sandbox/ /opt/spark/work-dir',
'--py-files=/sandbox/\*',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#
# Prevent any errors from being silently ignored
set -eo pipefail
set -x

attempt_setup_fake_passwd_entry() {
# Check whether there is a passwd entry for the container UID
Expand Down Expand Up @@ -48,39 +49,16 @@ fi

# BEGIN SAAGIE SPECIFIC CODE
cd /sandbox
# parse content and if pyfiles extract minio url and inject it
if [ -f main_script ] && grep -q "\--py-files" main_script;
if [ -f *.zip ]
then
PYSPARK_FILES="`grep -Po '.*--py-files=\K[^ ]+' main_script`"
fi;

if [ -n "$PYSPARK_FILES" ]; then
PYTHONPATH="$PYTHONPATH:$PYSPARK_FILES"
#Copy and unzip pyfiles
if [[ $PYSPARK_FILES == *[,]* ]];then
echo "PYSPARK_FILES contains comma"
pyfiles=$(echo $PYSPARK_FILES | tr "," "\n")

for file in $pyfiles
do
echo ">>> [$file]"
wget -nv $file
done
else
echo ">>> [$PYSPARK_FILES]"
wget -nv $PYSPARK_FILES
fi
if [ -f *.zip ]
then
unzip -q *.zip
fi
if [ -f "requirements.txt" ]
then
pip install -r requirements.txt
fi
rm -Rf /opt/spark/work-dir
ln -s /sandbox/ /opt/spark/work-dir
unzip -q *.zip
fi
if [ -f "requirements.txt" ]
then
pip install -r requirements.txt
fi
rm -Rf /opt/spark/work-dir
ln -s /sandbox/ /opt/spark/work-dir
# END SAAGIE SPECIFIC CODE

SPARK_CLASSPATH="$SPARK_CLASSPATH:${SPARK_HOME}/jars/*"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
true
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
image: saagie/spark
baseTag: 3.5-py-3.12
dynamicVersion: 1.190.0_spark-3.5
version: 3.5-py-3.12-1.190.0
dynamicVersion: 1.194.0_sparkWithoutMinio
version: 3.5-py-3.12-1.194.0_sparkWithoutMinio
Loading
Loading