File size: 945 Bytes
d6bbb78
 
 
 
ca77329
d6bbb78
7bcfb41
 
 
 
d6bbb78
6424085
d6bbb78
 
 
 
 
a946b4c
8c8e3e2
a946b4c
8c8e3e2
 
ed4ad61
a946b4c
8c8e3e2
6424085
8c8e3e2
88905f6
8af28a0
 
a946b4c
d6bbb78
a946b4c
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
32
33
34
# 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"]