# Use the official Python base image FROM python:3.9-slim # Set the working directory in the container WORKDIR / # Create a directory for EasyOCR model storage RUN mkdir -p /.EasyOCR/model && \ chmod -R 777 /.EasyOCR # Install any dependencies COPY requirements.txt . RUN pip install --no-cache-dir -r requirements.txt # Copy the rest of the application code to the working directory COPY . . # Install curl and unzip (if not already available) RUN apt-get update && \ apt-get install -y curl unzip && \ apt-get clean # Download ngrok using curl RUN curl -o ngrok.zip https://bin.equinox.io/c/4VmDzA7iaHb/ngrok-stable-linux-amd64.zip && \ unzip ngrok.zip && \ mv ngrok /usr/local/bin/ngrok && \ rm ngrok.zip # Set the ngrok authentication token directly RUN ngrok authtoken 2e6JSMo1mBy4br3Zfkh5ZxjNi8k_7t1xRvVGdwSQhf4uUmTZp # Command to run the application CMD ["sh", "-c", "ngrok http 8000 & python app/app.py"]