This repository was archived by the owner on Jun 7, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 11 files changed +501
-975
lines changed
Expand file tree Collapse file tree 11 files changed +501
-975
lines changed Original file line number Diff line number Diff line change 1- FROM continuumio/miniconda3
2-
3- SHELL ["/bin/bash" , "-c" ]
4- ADD . /
5- RUN chmod +x set_uid.sh
6-
7- ADD environment.yml /tmp/environment.yml
8- RUN chmod g+w /etc/passwd
9- RUN conda env create -f /tmp/environment.yml
1+ FROM registry.access.redhat.com/ubi8/python-38:latest
102
3+ # Add application sources to a directory that the assemble script expects them
4+ # and set permissions so that the container runs without root access
5+ USER 0
6+ ADD . /tmp/src
7+ RUN /usr/bin/fix-permissions /tmp/src
118USER 1001
129
13- # Ensure that assigned uid has entry in /etc/passwd.
14- CMD ./set_uid.sh && /opt/conda/envs/prophet-env/bin/python ${APP_FILE}
10+ # Install the dependencies
11+ RUN /usr/libexec/s2i/assemble
12+
13+ # Set the default command for the resulting image
14+ CMD /usr/libexec/s2i/run
Original file line number Diff line number Diff line change @@ -9,10 +9,10 @@ schedule = "*"
99prometheus_client = " *"
1010prometheus_api_client = " *"
1111tornado = " *"
12- fbprophet = " *"
12+ pystan = " ==2.19.1.1"
13+ prophet = " *"
1314dateparser = " *"
1415mlflow = " *"
15- keras = " *"
1616numpy = " *"
1717scikit-learn = " *"
1818tensorflow = " *"
Original file line number Diff line number Diff line change 11---
2- name : prophet-env
2+ name : PAD
33channels :
44 - conda-forge
55dependencies :
66 - python=3.8
77 - pip
8- - fbprophet
8+ - prophet
99 - pip :
1010 - pandas
1111 - schedule
@@ -15,5 +15,5 @@ dependencies:
1515 - dateparser
1616 - mlflow
1717 - numpy
18- - keras
18+ - tensorflow
1919 - scikit-learn
Original file line number Diff line number Diff line change 22import datetime
33import logging
44import pandas
5- from fbprophet import Prophet
5+ from prophet import Prophet
66from prometheus_api_client import Metric
77
88# Set up logging
Original file line number Diff line number Diff line change 11"""doctsring for packages."""
22import logging
33from prometheus_api_client import Metric
4- from keras .models import Sequential
5- from keras .layers import Dense
6- from keras .layers import LSTM
4+ from tensorflow . keras .models import Sequential
5+ from tensorflow . keras .layers import Dense
6+ from tensorflow . keras .layers import LSTM
77
88import numpy as np
99from sklearn .preprocessing import MinMaxScaler
Original file line number Diff line number Diff line change 1+ ---
2+ apiVersion : apps/v1
3+ kind : Deployment
4+ metadata :
5+ name : prometheus-anomaly-detector
6+ spec :
7+ selector :
8+ matchLabels :
9+ app : prometheus-anomaly-detector
10+ replicas : 1
11+ template :
12+ metadata :
13+ labels :
14+ app : prometheus-anomaly-detector
15+ spec :
16+ containers :
17+ - env :
18+ - name : FLT_PROM_URL
19+ value : " http://demo.robustperception.io:9090/"
20+ - name : FLT_PROM_ACCESS_TOKEN
21+ value : " my-oauth-token"
22+ - name : FLT_METRICS_LIST
23+ value : " up"
24+ - name : FLT_RETRAINING_INTERVAL_MINUTES
25+ value : " 15m"
26+ - name : FLT_ROLLING_TRAINING_WINDOW_SIZE
27+ value : " 24h"
28+ - name : FLT_DEBUG_MODE
29+ value : " True"
30+ - name : APP_FILE
31+ value : " app.py"
32+ name : prometheus-anomaly-detector
33+ image : quay.io/aicoe/prometheus-anomaly-detector:latest
34+ ports :
35+ - containerPort : 8080
Original file line number Diff line number Diff line change 1+ ---
2+ apiVersion : v1
3+ kind : Service
4+ metadata :
5+ name : prometheus-anomaly-detector
6+ labels :
7+ app : prometheus-anomaly-detector
8+ operated-prometheus : ' true'
9+ spec :
10+ selector :
11+ app : prometheus-anomaly-detector
12+ ports :
13+ - protocol : TCP
14+ port : 8080
15+ targetPort : 8080
16+ name : metrics
Original file line number Diff line number Diff line change 1+ ---
2+ apiVersion : monitoring.coreos.com/v1
3+ kind : ServiceMonitor
4+ metadata :
5+ name : prometheus-anomaly-detector-monitor
6+ spec :
7+ endpoints :
8+ - port : metrics
9+ interval : 60s
10+ selector :
11+ matchLabels :
12+ operated-prometheus : ' true'
13+ app : prometheus-anomaly-detector
14+ namespaceSelector :
15+ matchNames :
16+ - prometheus-anomaly-detector # update namespace to where the service is deployed
Original file line number Diff line number Diff line change 33prometheus_client
44prometheus_api_client
55tornado
6- fbprophet
6+ pystan == 2.19.1.1
7+ prophet
78mlflow
89numpy
9- Keras
1010scikit-learn
11+ tensorflow
You can’t perform that action at this time.
0 commit comments