Skip to content

Commit

Permalink
Addressed comments for Unified Dockerfile
Browse files Browse the repository at this point in the history
Signed-off-by: Tushar Tathgur <[email protected]>
  • Loading branch information
Tushar Tathgur authored and Tushar Tathgur committed Mar 7, 2023
1 parent 05d77bd commit 557cd9a
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ jobs:
run: |
echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
make clickhouse-server-multi-arch
check-spark-jobs-changes:
name: Check whether spark-jobs image needs to be built based on diff
runs-on: [ubuntu-latest]
Expand Down
8 changes: 4 additions & 4 deletions build/images/Dockerfile.spark-jobs.ubuntu
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FROM gcr.io/spark-operator/spark-py:v3.1.1

LABEL maintainer="Antrea <[email protected]>"
LABEL description="A docker image to deploy policy recommendation and throughput anomaly detector Spark job."
LABEL description="A docker image to deploy policy recommendation and throughput anomaly detection Spark job."

WORKDIR /opt/spark/work-dir
USER root
Expand All @@ -13,11 +13,11 @@ RUN apt-get --allow-releaseinfo-change update && \
COPY plugins/policy-recommendation/policy_recommendation_job.py /opt/spark/work-dir/policy_recommendation_job.py
COPY plugins/policy-recommendation/policy_recommendation_utils.py /opt/spark/work-dir/policy_recommendation_utils.py
COPY plugins/policy-recommendation/antrea_crd.py /opt/spark/work-dir/antrea_crd.py
COPY plugins/anomaly-detection/AnomalyDetection.py /opt/spark/work-dir/AnomalyDetection.py
COPY plugins/anomaly-detection/requirements.txt /opt/spark/work-dir/requirements.txt
COPY plugins/anomaly-detection/anomaly_detection.py /opt/spark/work-dir/anomaly_detection.py
COPY plugins/anomaly-detection/requirements.txt /opt/spark/work-dir/anomaly_detection_requirements.txt


RUN pip3 install --upgrade pip && \
pip3 install pyyaml && \
pip3 install kubernetes && \
pip3 install -r /opt/spark/work-dir/requirements.txt
pip3 install -r /opt/spark/work-dir/anomaly_detection_requirements.txt
2 changes: 1 addition & 1 deletion pkg/controller/anomalydetector/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ import (
const (
controllerName = "AnomalyDetectorController"
// Spark related parameters
sparkAppFile = "local:///opt/spark/work-dir/AnomalyDetection.py"
sparkAppFile = "local:///opt/spark/work-dir/anomaly_detection.py"
)

var (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

from pyspark.sql import SparkSession

import AnomalyDetection as ad
import anomaly_detection as ad


@pytest.fixture(scope="session")
Expand Down

0 comments on commit 557cd9a

Please sign in to comment.