krupal02 commited on
Commit
a8133bd
·
verified ·
1 Parent(s): 84435e8

Upload Dockerfile with huggingface_hub

Browse files
Files changed (1) hide show
  1. Dockerfile +31 -0
Dockerfile ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.11-slim
2
+
3
+ WORKDIR /app
4
+
5
+ # Install system dependencies for OpenCV
6
+ RUN apt-get update && apt-get install -y \
7
+ libgl1 \
8
+ libglib2.0-0 \
9
+ libsm6 \
10
+ libxext6 \
11
+ libxrender-dev \
12
+ libxcb1 \
13
+ && rm -rf /var/lib/apt/lists/*
14
+
15
+ COPY requirements.txt .
16
+
17
+ # Install Python dependencies
18
+ RUN pip install --no-cache-dir -r requirements.txt
19
+
20
+ # Install CPU-only PyTorch (keeps image small)
21
+ RUN pip install torch torchvision --index-url https://download.pytorch.org/whl/cpu
22
+
23
+ # Install ultralytics (YOLO)
24
+ RUN pip install ultralytics
25
+
26
+ COPY . .
27
+
28
+ EXPOSE 7860
29
+
30
+ # Run Streamlit (default for HF Spaces)
31
+ CMD ["streamlit", "run", "streamlit_app.py", "--server.port=7860", "--server.address=0.0.0.0"]