-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
25 lines (18 loc) · 744 Bytes
/
Dockerfile
File metadata and controls
25 lines (18 loc) · 744 Bytes
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
# Start with the official, lightweight Python 3.13 base image
FROM python:3.13-slim
RUN apt-get update && apt-get install -y \
tesseract-ocr \
tesseract-ocr-eng \
&& rm -rf /var/lib/apt/lists/*
# Set the working directory inside the container to /app
WORKDIR /app
# Copy the project definition file first to leverage Docker's caching
COPY pyproject.toml .
# Install the project and all its dependencies from pyproject.toml
RUN pip install .
# Now copy your application code into the /app directory
COPY ./app /app/app
# Tell Docker that your application will listen on port 8000
EXPOSE 8000
# The command to run your application when the container starts
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000"]