usmanyousaf commited on
Commit
dc19f23
·
verified ·
1 Parent(s): b7e1e1a

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +23 -0
Dockerfile ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Use a lightweight Python base image
2
+ FROM python:3.10-slim
3
+
4
+ # Set the working directory in the container
5
+ WORKDIR /app
6
+
7
+ # Install necessary system dependencies
8
+ RUN apt-get update && \
9
+ apt-get install -y libopencv-dev tesseract-ocr && \
10
+ rm -rf /var/lib/apt/lists/*
11
+
12
+ # Copy the requirements file and install Python dependencies
13
+ COPY requirements.txt /app/
14
+ RUN pip install --no-cache-dir -r requirements.txt
15
+
16
+ # Copy the rest of the application code
17
+ COPY . /app/
18
+
19
+ # Expose the port FastAPI will run on
20
+ EXPOSE 8000
21
+
22
+ # Command to run the FastAPI app using Uvicorn
23
+ CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"]