-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy pathDockerfile
More file actions
29 lines (21 loc) · 736 Bytes
/
Copy pathDockerfile
File metadata and controls
29 lines (21 loc) · 736 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
26
27
28
29
FROM python:3.12-slim
# Set working directory
WORKDIR /app
# Install system dependencies (if needed, e.g., for image processing)
RUN apt-get update && apt-get install -y --no-install-recommends \
libjpeg-dev \
zlib1g-dev \
poppler-utils \
&& rm -rf /var/lib/apt/lists/*
# Install Poetry
RUN pip install --no-cache-dir poetry
# Copy Poetry files
COPY pyproject.toml poetry.lock* /app/
# Install project dependencies
RUN poetry config virtualenvs.create false && poetry install --only main --no-root --no-interaction --no-ansi
# Copy the application code
COPY . /app
# Expose the port
EXPOSE 8000
# Run the FastAPI app with uvicorn
CMD ["uvicorn", "pyvisionai.api.main:app", "--host", "0.0.0.0", "--port", "8000"]