muddasser commited on
Commit
7b19310
·
verified ·
1 Parent(s): 88b7b99

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +4 -2
Dockerfile CHANGED
@@ -25,8 +25,10 @@ COPY requirements.txt .
25
  # Install Python packages
26
  RUN pip install --no-cache-dir -r requirements.txt
27
 
28
- # Download YOLOv8 ANPR model weights
29
- RUN curl -L -o /app/anpr_yolov8.pt "https://github.com/madalinabuzatu/yolov8-license-plate-detection/releases/download/v1.0/best.pt"
 
 
30
 
31
  # Copy app code
32
  COPY app.py .
 
25
  # Install Python packages
26
  RUN pip install --no-cache-dir -r requirements.txt
27
 
28
+ # Download YOLOv8 ANPR model weights with validation
29
+ RUN curl -L --retry 3 --retry-delay 5 -o /app/anpr_yolov8.pt \
30
+ "https://github.com/madalinabuzatu/yolov8-license-plate-detection/releases/download/v1.0/best.pt" \
31
+ && [ -s /app/anpr_yolov8.pt ] || { echo "Error: Model download failed or file is empty"; exit 1; }
32
 
33
  # Copy app code
34
  COPY app.py .