Category : python

I’m trying to deploy a Flask application using Apache Spark 3.1.1 on Kubernetes. app.py from flask import Flask from pyspark.sql import SparkSession app = Flask(__name__) app.debug = True @app.route(‘/’) def main(): print("Start of Code") spark = SparkSession.builder.appName("Test").getOrCreate() sc=spark.sparkContext spark.stop() print("End of Code") return ‘hi’ if __name__ == ‘__main__’: app.run() requirements.txt flask pyspark Dockerfile NOTE: "spark-py" ..

Read more

I am setting up a cicd pipeline that runs on kubernetes. The image builder is kaniko and it must push to azure acr. So, I’ve set up a kaniko + azure cli image with the following dockerfile: FROM gcr.io/kaniko-project/executor:latest as kaniko FROM alpine:latest COPY –from=kaniko /kaniko /kaniko RUN ls / ENV DOCKER_CONFIG /kaniko/.docker ENV SSL_CERT_DIR=/kaniko/ssl/certs ..

Read more

I am working in a Java spring boot application, running as a docker container. The main purose of this application was to execute python scripts. So inside the docker container, I had to make available python environment. I added the python runtime with this code. But seems this is very basic python verson and I ..

Read more

I have a watiress API, I am trying to make it public in a docker contain, However i am receiving the following error: return self.socket.bind(addr) fleettracker_1 | OSError: [Errno 99] Cannot assign requested address Here is my Docker-compose yml version: ‘3’ services: fleettracker: build: ./fleettracker ports: – "5000:5017" links: – db networks: – fullstack db: ..

Read more

Dockerfile best practices gives the following recommendation for apt-get update usage: Always combine RUN apt-get update with apt-get install in the same RUN statement. Should I also use the same rule with pip install -U pip? E.g. which pratice is preferable inside Dockerfile: # Separate statements RUN pip install -U pip RUN pip install opencv-python==4.4.0.46 ..

Read more