usmanyousaf commited on
Commit
ce93d33
·
verified ·
1 Parent(s): 316e596

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +12 -18
Dockerfile CHANGED
@@ -1,23 +1,17 @@
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", "7860"]
 
1
+ FROM python:3.10
 
2
 
3
+ # Install tesseract and dependencies
4
+ RUN apt-get update && apt-get install -y tesseract-ocr
 
 
 
 
 
5
 
6
+ # Install Python dependencies
7
+ COPY requirements.txt /app/requirements.txt
8
+ RUN pip install -r /app/requirements.txt
9
 
10
+ # Set the working directory
11
+ WORKDIR /app
12
 
13
+ # Copy the rest of your application code
14
+ COPY . /app
15
 
16
+ # Command to run your FastAPI app
17
+ CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8080"]