40 lines
843 B
Docker
40 lines
843 B
Docker
# Use Python 3.11 slim image
|
|
FROM python:3.11-slim
|
|
|
|
# Set working directory
|
|
WORKDIR /app
|
|
|
|
# Install system dependencies for OpenCV and build tools
|
|
RUN apt-get update && apt-get install -y \
|
|
libgl1 \
|
|
libglib2.0-0 \
|
|
libsm6 \
|
|
libxext6 \
|
|
libxrender1 \
|
|
libgomp1 \
|
|
ffmpeg \
|
|
build-essential \
|
|
cmake \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
# Copy requirements first for better caching
|
|
COPY requirements.txt .
|
|
|
|
# Install Python dependencies
|
|
RUN pip install --no-cache-dir -r requirements.txt
|
|
|
|
# Copy project files
|
|
COPY . .
|
|
|
|
# Create data/config directories
|
|
RUN mkdir -p data jetson/config
|
|
|
|
# Add /app to Python path so 'src' module can be imported
|
|
ENV PYTHONPATH=/app:$PYTHONPATH
|
|
|
|
# Expose web UI/API port
|
|
EXPOSE 8080
|
|
|
|
# Default command - run Jetson referee web app
|
|
CMD ["python3", "jetson/main.py", "--port", "8080"]
|