Bingdo commited on
Commit
8e8997b
·
1 Parent(s): 2945372

Add Dockerfile for container deployment

Browse files
Files changed (2) hide show
  1. .dockerignore +11 -0
  2. Dockerfile +25 -0
.dockerignore ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .git
2
+ .gitignore
3
+ __pycache__
4
+ *.pyc
5
+ *.pyo
6
+ .DS_Store
7
+ *.md
8
+ !README.md
9
+ .env
10
+ .venv
11
+ venv
Dockerfile ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.11-slim
2
+
3
+ WORKDIR /app
4
+
5
+ # Install system dependencies
6
+ RUN apt-get update && apt-get install -y \
7
+ build-essential \
8
+ curl \
9
+ && rm -rf /var/lib/apt/lists/*
10
+
11
+ # Copy requirements and install Python dependencies
12
+ COPY requirements.txt .
13
+ RUN pip install --no-cache-dir -r requirements.txt
14
+
15
+ # Copy application code
16
+ COPY . .
17
+
18
+ # Expose Streamlit port
19
+ EXPOSE 7860
20
+
21
+ # Health check
22
+ HEALTHCHECK CMD curl --fail http://localhost:7860/_stcore/health || exit 1
23
+
24
+ # Run Streamlit
25
+ CMD ["streamlit", "run", "app.py", "--server.port=7860", "--server.address=0.0.0.0", "--server.headless=true"]