Skip to content

Commit

Permalink
build: add Docker for deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
Will413028 committed Feb 24, 2024
1 parent 441e2ed commit 143dd82
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 1 deletion.
22 changes: 22 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
FROM python:3.9-slim

WORKDIR /app

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

COPY . .

RUN pip install --no-cache-dir -r requirements.txt

EXPOSE 8501

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

ENTRYPOINT ["streamlit", "run", "streamlit_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
@@ -0,0 +1,7 @@
version: '3.8'

services:
streamlit-app:
build: .
ports:
- "8501:8501"
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ numpy==1.23.0
omegaconf==2.3.0
onnx==1.13.0
onnxruntime==1.13.1
onnxsim==0.4.35
onnxsim==0.4.33
openai==1.12.0
opencv-python-headless==4.9.0.80
oscrypto==1.3.0
Expand Down

0 comments on commit 143dd82

Please sign in to comment.