Vishaltiwari2019 commited on
Commit
413cd3f
·
verified ·
1 Parent(s): a1000de

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +23 -0
Dockerfile ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Use official Python image from Docker Hub
2
+ FROM python:3.9-slim
3
+
4
+ # Set the working directory inside the container
5
+ WORKDIR /app
6
+
7
+ # Copy requirements.txt to the container
8
+ COPY requirements.txt .
9
+
10
+ # Install dependencies
11
+ RUN pip install --no-cache-dir -r requirements.txt
12
+
13
+ # Copy the rest of the application files into the container
14
+ COPY . .
15
+
16
+ # Copy PDF files into the container (optional if you need PDFs inside the container)
17
+ COPY pdfs /app/pdfs
18
+
19
+ # Expose the port FastAPI will run on
20
+ EXPOSE 8000
21
+
22
+ # Run the FastAPI app using Uvicorn
23
+ CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"]