forked from superagent-ai/super-rag
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
20 lines (14 loc) · 669 Bytes
/
Dockerfile
File metadata and controls
20 lines (14 loc) · 669 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# Use an official Python runtime as a parent image
FROM python:3.11 AS builder
# Copy the current directory contents into the container
COPY . .
# Install Poetry
RUN pip install poetry
# Copy only dependency files for layer caching
COPY pyproject.toml poetry.lock ./
# Install the required packages of the application
RUN poetry install --no-root && rm -rf $POETRY_CACHE_DIR
# Make port 80 available to the world outside this container
ENV PORT="8080"
# Run main.py when the container launches
CMD ["poetry", "run", "gunicorn", "--bind", ":8080", "--workers", "2", "--timeout", "0", "--worker-class", "uvicorn.workers.UvicornWorker", "--threads", "8", "main:app"]