Added docker and k8s stuff
This commit is contained in:
parent
fcef542a7c
commit
a45abf5870
14
Dockerfile
Normal file
14
Dockerfile
Normal file
@ -0,0 +1,14 @@
|
||||
FROM registry.kmlabz.com/birbnetes/ai-base-image
|
||||
|
||||
RUN apt update && apt install -y libsndfile1-dev libsndfile1 && apt clean
|
||||
|
||||
ENV PIP_NO_CACHE_DIR=true
|
||||
ENV TZ Europe/Budapest
|
||||
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
|
||||
|
||||
ADD cnn_classification_service requirements.txt /cnn_classification_service/
|
||||
WORKDIR /cnn_classification_service/
|
||||
|
||||
RUN pip3 install -r requirements.txt
|
||||
|
||||
ENTRYPOINT ["python3", "main.py"]
|
13
k8s/configmap.yaml
Normal file
13
k8s/configmap.yaml
Normal file
@ -0,0 +1,13 @@
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: cnn-classification-service
|
||||
labels:
|
||||
app: cnn-classification-service
|
||||
namespace: birbnetes
|
||||
data:
|
||||
SENTRY_DSN: https://6d243347cf9f4fc6a54759c3eb34e864@sentry.kmlabz.com/8
|
||||
RELEASE_ID: luna-k8s
|
||||
RELEASEMODE: release
|
||||
PIKA_URL: amqp://user:1wZVQnP5vy@birb-rabbitmq:5672/
|
||||
PIKA_EXCHANGE_NAME: "wave"
|
27
k8s/deployment.yaml
Normal file
27
k8s/deployment.yaml
Normal file
@ -0,0 +1,27 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: cnn-classification-service
|
||||
namespace: birbnetes
|
||||
labels:
|
||||
app: cnn-classification-service
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: cnn-classification-service
|
||||
strategy:
|
||||
type: Recreate
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: cnn-classification-service
|
||||
spec:
|
||||
containers:
|
||||
- image: registry.kmlabz.com/birbnetes/cnn-classification-service
|
||||
name: cnn-classification-service
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: cnn-classification-service
|
||||
imagePullSecrets:
|
||||
- name: regcred
|
@ -8,3 +8,5 @@ keras
|
||||
numpy
|
||||
matplotlib
|
||||
keras_preprocessing
|
||||
tensorflow
|
||||
sndfile
|
Loading…
Reference in New Issue
Block a user