-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
34 lines (26 loc) · 973 Bytes
/
Copy pathDockerfile
File metadata and controls
34 lines (26 loc) · 973 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
30
31
32
33
34
# building with AWS initially
# FROM public.ecr.aws/lambda/python:3.12
FROM python:3.12
RUN pip install poetry==1.8.3
ENV POETRY_NO_INTERACTION=1 \
POETRY_VIRTUALENVS_IN_PROJECT=1 \
POETRY_VIRTUALENVS_CREATE=1 \
POETRY_CACHE_DIR=/tmp/poetry_cache
COPY app.py params.json supervisor_workflow.py utilities.py config.py .env crag_agent.py ./
COPY poetry.lock pyproject.toml ./
COPY services ./services
COPY dynamic_worker ./dynamic_worker
COPY supervisor ./supervisor
COPY utilities ./utilities
COPY crag ./crag
# DISABLE CACHE
RUN poetry install --without test --no-root && rm -rf $POETRY_CACHE_DIR
# ENABLE VIRTUALENV
ENV VIRTUAL_ENV=/.venv \
PATH="/.venv/bin:$PATH"
# OPEN PORT
EXPOSE 8080
# Command can be overwritten by providing a different command in the template directly.
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "8080"]
# CMD ["fastapi", "run", "app.py", "--port", "80"]
# ENTRYPOINT ["poetry", "run", "python", "-m", "app"]