Skip to content

Commit

Permalink
Update Docker configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
sahi-mfg committed Dec 16, 2023
1 parent dff3a8b commit 0e50826
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 16 deletions.
3 changes: 3 additions & 0 deletions Dockerfile.fastapi → Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
FROM tiangolo/uvicorn-gunicorn:python3.10

WORKDIR /app

COPY requirements.txt /tmp/
RUN pip install --no-cache-dir --upgrade -r /tmp/requirements.txt

COPY . /app/

CMD ["uvicorn","main:app", "--port","5001", "--host","0.0.0.0"]
12 changes: 0 additions & 12 deletions Dockerfile.streamlit

This file was deleted.

8 changes: 4 additions & 4 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
version: '3.10'
version: "3.10"

services:
fastapi:
build:
context: .
dockerfile: Dockerfile.fastapi
dockerfile: Dockerfile
ports:
- 5001:5000

streamlit:
build:
context: .
dockerfile: Dockerfile.streamlit
dockerfile: ui/Dockerfile
ports:
- 8501:8501
- 8501:8501
15 changes: 15 additions & 0 deletions ui/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
FROM python:3.10-slim

WORKDIR /ui

COPY requirements.txt /tmp/
RUN pip install --no-cache-dir --upgrade -r /tmp/requirements.txt

COPY . /ui/

EXPOSE 8501

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


ENTRYPOINT ["streamlit", "run", "ui/app.py", "--server.port=8501", "--server.address=0.0.0.0"]

0 comments on commit 0e50826

Please sign in to comment.