-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Unified Dockerfile Image for Spark Jobs Currently Theia supports separate dockerfiles for anomalydetector and policyrecommendation, this PR helps unify these dockerfiles resulting into lesser storage space. Unified Dockerimage now uses 1.4 GB of image space than earlier 2.4GB combined Spark Jobs constants have been moved under utils.go in order to avoid duplicacy of constants Solve #161 Signed-off-by: Tushar Tathgur <[email protected]>
- Loading branch information
Tushar Tathgur
authored and
Tushar Tathgur
committed
Mar 4, 2023
1 parent
165ae97
commit bd70023
Showing
12 changed files
with
120 additions
and
226 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 Spark job." | ||
LABEL description="A docker image to deploy policy recommendation and throughput anomaly detector Spark job." | ||
|
||
WORKDIR /opt/spark/work-dir | ||
USER root | ||
|
@@ -10,10 +10,14 @@ RUN apt-get --allow-releaseinfo-change update && \ | |
apt-get install -y --no-install-recommends wget ca-certificates && \ | ||
wget https://github.com/ClickHouse/clickhouse-jdbc/releases/download/v0.3.1/clickhouse-jdbc-0.3.1.jar -P /opt/spark/jars/ | ||
|
||
RUN pip3 install --upgrade pip && \ | ||
pip3 install pyyaml && \ | ||
pip3 install kubernetes | ||
|
||
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 | ||
|
||
|
||
RUN pip3 install --upgrade pip && \ | ||
pip3 install pyyaml && \ | ||
pip3 install kubernetes && \ | ||
pip3 install -r /opt/spark/work-dir/requirements.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.