Abs6187 commited on
Commit
38056ad
·
verified ·
1 Parent(s): 04caf86

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +34 -0
Dockerfile ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.9-slim
2
+
3
+ # Set working directory
4
+ WORKDIR /app
5
+
6
+ # Install system dependencies
7
+ RUN apt-get update && apt-get install -y \
8
+ ffmpeg \
9
+ libgl1 \
10
+ libglib2.0-0 \
11
+ libsm6 \
12
+ libxrender1 \
13
+ libxext6 \
14
+ && rm -rf /var/lib/apt/lists/*
15
+
16
+ # Copy requirements first for better caching
17
+ COPY requirements.txt .
18
+ COPY packages.txt .
19
+
20
+ # Install Python dependencies
21
+ RUN pip install --no-cache-dir -r requirements.txt
22
+
23
+ # Copy application files
24
+ COPY . .
25
+
26
+ # Expose port
27
+ EXPOSE 7860
28
+
29
+ # Health check
30
+ HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
31
+ CMD curl -f http://localhost:7860/_stcore/health || exit 1
32
+
33
+ # Run the application
34
+ CMD ["streamlit", "run", "app.py", "--server.port=7860", "--server.address=0.0.0.0"]