File size: 673 Bytes
d714b61
 
a793b14
d714b61
 
a793b14
d714b61
a793b14
 
d714b61
 
 
a793b14
d714b61
 
a793b14
d714b61
a793b14
 
d714b61
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# Use an official Python runtime as a parent image.
FROM python:3.10-slim

# Install system dependencies (poppler-utils is required by pdf2image).
RUN apt-get update && apt-get install -y poppler-utils && rm -rf /var/lib/apt/lists/*

# Set the working directory.
WORKDIR /app

# Copy requirements and install Python dependencies.
COPY requirements.txt .
RUN pip install --upgrade pip && pip install -r requirements.txt

# Copy the application code.
COPY main.py .

# Expose the port FastAPI will run on.
EXPOSE 7860

# Command to run the FastAPI app using uvicorn via the module interface.
CMD ["python", "-m", "uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]