PrashanthB461 commited on
Commit
01ade1e
·
verified ·
1 Parent(s): 190be42

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +6 -8
Dockerfile CHANGED
@@ -1,16 +1,14 @@
1
- # Use Python 3.10-slim as base image
2
  FROM python:3.10-slim
3
 
4
- # Install system dependencies for OpenCV, FFmpeg, wget, and debugging
5
  RUN apt-get update && apt-get install -y \
6
  libgl1-mesa-glx \
7
  libglib2.0-0 \
8
  ffmpeg \
9
- curl \
10
  wget \
11
  && rm -rf /var/lib/apt/lists/*
12
 
13
- # Create necessary directories with proper permissions
14
  RUN mkdir -p /tmp/Ultralytics /tmp/snapshots && \
15
  chmod -R 777 /tmp/Ultralytics /tmp/snapshots
16
 
@@ -24,10 +22,10 @@ RUN pip install --no-cache-dir -r requirements.txt
24
 
25
  # Copy application code
26
  COPY app.py /app.py
27
- RUN chmod 644 /app.py
28
 
29
- # Expose port
30
- EXPOSE 7860
31
 
32
- # Run app.py directly
33
  CMD ["python", "/app.py"]
 
 
1
  FROM python:3.10-slim
2
 
3
+ # Install system dependencies
4
  RUN apt-get update && apt-get install -y \
5
  libgl1-mesa-glx \
6
  libglib2.0-0 \
7
  ffmpeg \
 
8
  wget \
9
  && rm -rf /var/lib/apt/lists/*
10
 
11
+ # Create directories
12
  RUN mkdir -p /tmp/Ultralytics /tmp/snapshots && \
13
  chmod -R 777 /tmp/Ultralytics /tmp/snapshots
14
 
 
22
 
23
  # Copy application code
24
  COPY app.py /app.py
25
+ COPY data.yaml /data.yaml
26
 
27
+ # Download custom model weights
28
+ RUN wget -O /tmp/yolov8_custom.pt https://huggingface.co/PrashanthB461/SafetyViolationAI1/resolve/main/yolov8_custom.pt
29
 
30
+ # Run the application
31
  CMD ["python", "/app.py"]