Vinay-11 commited on
Commit
dad771b
·
verified ·
1 Parent(s): 7f3058f

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +29 -0
Dockerfile ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.11-slim
2
+
3
+ # System deps for Pillow / TensorFlow
4
+ RUN apt-get update && apt-get install -y \
5
+ build-essential \
6
+ libglib2.0-0 \
7
+ libsm6 \
8
+ libxext6 \
9
+ libxrender1 \
10
+ && rm -rf /var/lib/apt/lists/*
11
+
12
+ # Workdir
13
+ WORKDIR /app
14
+
15
+ # Copy requirements and install
16
+ COPY requirements.txt .
17
+ RUN pip install --no-cache-dir -r requirements.txt
18
+
19
+ # Copy app code
20
+ COPY app.py .
21
+ COPY classification_model_compressed.tflite .
22
+ COPY detection_model_compressed.tflite .
23
+ COPY static ./static
24
+
25
+ # Expose port (Hugging Face expects 7860 by default, but it's okay as long as we match README)
26
+ EXPOSE 7860
27
+
28
+ # Start FastAPI with uvicorn
29
+ CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]