File size: 671 Bytes
b42373a fa413c9 b42373a 704a009 b42373a 704a009 | 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 | FROM python:3.11-slim
# Install system dependencies required for OpenCV and pyzbar (barcodes)
RUN apt-get update && apt-get install -y \
libgl1 \
libglib2.0-0 \
libzbar0 \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
# Copy requirements and install
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
RUN pip install --no-cache-dir fastapi uvicorn python-multipart
# Copy all project files
COPY . .
# Create directories if they don't exist
RUN mkdir -p temp_uploads results images/barcode images/chassis
# Expose FastAPI port
EXPOSE 7860
# Start application
CMD ["uvicorn", "server:app", "--host", "0.0.0.0", "--port", "7860"] |