Skip to content

Commit

Permalink
add container for streamlit
Browse files Browse the repository at this point in the history
  • Loading branch information
jrpereirajr committed Jul 28, 2024
1 parent fdc58d6 commit 9822065
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
iris-main.log
.env
.git

tmp
20 changes: 20 additions & 0 deletions Dockerfile-streamlit
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
FROM python:3.9-slim

COPY ./python/sqlzilla /app

WORKDIR /app

RUN apt-get update && apt-get install -y \
build-essential \
curl \
software-properties-common \
git \
&& rm -rf /var/lib/apt/lists/*

RUN pip3 install -r requirements.txt

EXPOSE 8501

HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health

ENTRYPOINT ["streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0"]
7 changes: 7 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,10 @@ services:
environment:
- OPENAI_API_KEY=$OPENAI_API_KEY
command: ["start-notebook.py", "--NotebookApp.token='123'"]

streamlit:
build:
context: .
dockerfile: Dockerfile-streamlit
ports:
- 8501:8501
3 changes: 3 additions & 0 deletions python/sqlzilla/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
streamlit
streamlit-code-editor
requests

0 comments on commit 9822065

Please sign in to comment.