Skip to content

Commit

Permalink
fix the streamlit app to work on docker-compose + upload new images w…
Browse files Browse the repository at this point in the history
…ith fixes to docker hub
  • Loading branch information
cmpxchg16 committed Apr 8, 2024
1 parent 7622646 commit 9eeb841
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 9 deletions.
4 changes: 3 additions & 1 deletion docker-compose.build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ services:
environment:
MYSQL_ROOT_PASSWORD: ""
MYSQL_ALLOW_EMPTY_PASSWORD: 1
MYSQL_DATABASE: vibranium
MYSQL_DATABASE: vibraniumdome
ports:
- "3306:3306"
command: --default-authentication-plugin=mysql_native_password
Expand Down Expand Up @@ -59,6 +59,8 @@ services:
- "8501:8501"
depends_on:
- vibraniumdome-app
env_file:
- ./vibraniumdome-shields/examples/.env.example

vibraniumdome-opensearch-node-1:
image: opensearchproject/opensearch:2.9.0
Expand Down
10 changes: 6 additions & 4 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: '3.8'
services:
vibraniumdome-app:
container_name: vibraniumdome-app
image: vibraniumdome/vibraniumdome-app:0.1.0
image: vibraniumdome/vibraniumdome-app:0.3.0
ports:
- "3000:3000"
env_file:
Expand All @@ -20,14 +20,14 @@ services:
environment:
MYSQL_ROOT_PASSWORD: ""
MYSQL_ALLOW_EMPTY_PASSWORD: 1
MYSQL_DATABASE: vibranium
MYSQL_DATABASE: vibraniumdome
ports:
- "3306:3306"
command: --default-authentication-plugin=mysql_native_password

vibraniumdome-shields:
container_name: vibraniumdome-shields
image: vibraniumdome/vibraniumdome-shields:0.1.0
image: vibraniumdome/vibraniumdome-shields:0.3.0
ports:
- "5001:5001"
env_file:
Expand All @@ -39,11 +39,13 @@ services:

vibraniumdome-streamlit-app:
container_name: vibraniumdome-streamlit-app
image: vibraniumdome/vibraniumdome-streamlit-app:0.1.0
image: vibraniumdome/vibraniumdome-streamlit-app:0.3.0
ports:
- "8501:8501"
depends_on:
- vibraniumdome-app
env_file:
- ./vibraniumdome-shields/examples/.env.example

vibraniumdome-opensearch-node-1:
image: opensearchproject/opensearch:2.9.0
Expand Down
2 changes: 1 addition & 1 deletion vibraniumdome-app/docker-deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ docker buildx build --platform linux/amd64,linux/arm64 \
--build-arg OPENSEARCH_JWT_HMAC_SIGNING_KEY=${OPENSEARCH_JWT_HMAC_SIGNING_KEY} \
--build-arg OPENSEARCH_DASHBOARD_URL=${OPENSEARCH_DASHBOARD_URL} \
--build-arg OPENSEARCH_GOVERNANCE_URL=${OPENSEARCH_GOVERNANCE_URL} \
--tag=vibraniumdome/vibraniumdome-app:0.1.0 --push .
--tag=vibraniumdome/vibraniumdome-app:0.3.0 --push .
2 changes: 1 addition & 1 deletion vibraniumdome-shields/docker-deploy.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/bin/bash
docker buildx create --use
docker buildx build --platform linux/amd64,linux/arm64 -t vibraniumdome/vibraniumdome-shields:0.1.0 --push .
docker buildx build --platform linux/amd64,linux/arm64 -t vibraniumdome/vibraniumdome-shields:0.3.0 --push .
2 changes: 1 addition & 1 deletion vibraniumdome-shields/docker-entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/bin/bash

PROMETHEUS_MULTIPROC_DIR=/tmp/ exec $POETRY_HOME/bin/poetry run gunicorn --bind 0.0.0.0:5001 --threads 4 --workers 4 --preload vibraniumdome_shields.main:app -k gthread
PROMETHEUS_MULTIPROC_DIR=/tmp/ exec $POETRY_HOME/bin/poetry run gunicorn --bind 0.0.0.0:5001 --threads 1 --workers 1 --preload vibraniumdome_shields.main:app -k gthread
3 changes: 3 additions & 0 deletions vibraniumdome-shields/examples/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
OPENAI_API_KEY=
VIBRANIUM_DOME_BASE_URL="http://vibraniumdome-shields:5001"
VIBRANIUM_DOME_API_KEY="vibranium_elgstr7i53e3vpy0pbc8175fp6eaj4k3fjzd"
2 changes: 1 addition & 1 deletion vibraniumdome-shields/examples/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ RUN apt-get update && apt-get install -y \

COPY streamlit_app.py .

RUN pip3 install streamlit streamlit_extras openai vibraniumdome-sdk
RUN pip3 install streamlit streamlit_extras openai vibraniumdome-sdk termcolor

EXPOSE 8501

Expand Down
3 changes: 3 additions & 0 deletions vibraniumdome-shields/examples/docker-deploy.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash
docker buildx create --use
docker buildx build --platform linux/amd64,linux/arm64 -t vibraniumdome/vibraniumdome-streamlit-app:0.3.0 --push .

0 comments on commit 9eeb841

Please sign in to comment.