A7md47 commited on
Commit
ffaa4f8
·
verified ·
1 Parent(s): 9e05137

Upload Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +32 -0
Dockerfile ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Use lightweight Python image
2
+ FROM python:3.10-slim
3
+
4
+ # Prevent Python from buffering logs
5
+ ENV PYTHONUNBUFFERED=1
6
+
7
+ # Set working directory
8
+ WORKDIR /app
9
+
10
+ # Install system dependencies (needed for TensorFlow/Pillow sometimes)
11
+ RUN apt-get update && apt-get install -y \
12
+ build-essential \
13
+ libglib2.0-0 \
14
+ libsm6 \
15
+ libxext6 \
16
+ libxrender-dev \
17
+ && rm -rf /var/lib/apt/lists/*
18
+
19
+ # Copy requirements first (for caching)
20
+ COPY requirements.txt .
21
+
22
+ # Install Python dependencies
23
+ RUN pip install --no-cache-dir -r requirements.txt
24
+
25
+ # Copy all files
26
+ COPY . .
27
+
28
+ # Expose port required by Hugging Face
29
+ EXPOSE 7860
30
+
31
+ # Run Streamlit app
32
+ CMD ["streamlit", "run", "app.py(11)", "--server.port=7860", "--server.address=0.0.0.0"]