Skip to content

Commit

Permalink
feat(spark-py): Add new spark-py image with python basic requirements
Browse files Browse the repository at this point in the history
  • Loading branch information
idirze committed Mar 28, 2024
1 parent 1d935f7 commit ad94e07
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions spark-py/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
#
# 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.
#
ARG SPARK_VERSION=3.2.1
ARG HADOOP_VERSION=3.2
ARG SCALA_VERSION=2.12
ARG JAVA_VERSION=11

ARG REGISTRY=quay.io
ARG REPO=okdp
ARG BASE_IMAGE=${REGISTRY}/${REPO}/spark:spark-${SPARK_VERSION}-scala-${SCALA_VERSION}-java-${JAVA_VERSION}

FROM $BASE_IMAGE

ARG PYTHON_VERSION 3.11

USER root

COPY requirements.txt .

RUN set -ex; \
apt-get update; \
apt-get install -y --no-install-recommends python${PYTHON_VERSION} python3-pip; \
pip install -r requirements.txt; \
rm -rf /var/lib/apt/lists/* requirements.txt

USER spark
Empty file added spark-py/requirements.txt
Empty file.

0 comments on commit ad94e07

Please sign in to comment.