premdeep09/ANPR-System
0
1# Use a lightweight Python image2FROM python:3.9-slim3 4# Set environment variables5ENV PYTHONDONTWRITEBYTECODE 16ENV PYTHONUNBUFFERED 17 8# Install system dependencies for OpenCV and EasyOCR9RUN apt-get update && apt-get install -y \10 libgl1 \11 libglib2.0-0 \12 ffmpeg \13 build-essential \14 && rm -rf /var/lib/apt/lists/*15 16# Set working directory17WORKDIR /app18 19# Copy requirements and install20COPY requirements.txt .21RUN pip install --no-cache-dir -r requirements.txt22 23# Copy the rest of the application24COPY . .25 26# Create storage and uploads directory with permissions27RUN mkdir -p storage uploads && chmod -R 777 storage uploads28 29# Make start script executable30RUN chmod +x start.sh31 32# Hugging Face Spaces run on port 7860 by default33EXPOSE 786034 35# Command to run the application36CMD ["./start.sh"]37 