File size: 784 Bytes
4e1ed59
 
01ade1e
4e1ed59
 
 
 
9027112
4e1ed59
 
01ade1e
0f60b04
 
4e1ed59
c9eeba2
4e1ed59
 
4c496ec
4e1ed59
 
 
 
c9eeba2
 
01ade1e
309ca05
01ade1e
 
73cfb00
01ade1e
c9eeba2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
FROM python:3.10-slim

# Install system dependencies
RUN apt-get update && apt-get install -y \
    libgl1-mesa-glx \
    libglib2.0-0 \
    ffmpeg \
    wget \
    && rm -rf /var/lib/apt/lists/*

# Create directories
RUN mkdir -p /tmp/Ultralytics /tmp/snapshots && \
    chmod -R 777 /tmp/Ultralytics /tmp/snapshots

# Set environment variables
ENV YOLO_CONFIG_DIR=/tmp/Ultralytics
ENV PYTHONUNBUFFERED=1

# Install Python dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt

# Copy application code
COPY app.py /app.py
COPY data.yaml /data.yaml

# Download custom model weights
RUN wget -O /tmp/yolov8_custom.pt https://huggingface.co/PrashanthB461/SafetyViolationAI1/resolve/main/yolov8_custom.pt

# Run the application
CMD ["python", "/app.py"]