langchain/libs/cli/langchain_cli/project_template/Dockerfile
William FH 04caf07dee
Make packages optional (#15727)
So we don't have to instruct people to modify the Dockerfile every time
they delete the packages directory.


See:
https://stackoverflow.com/questions/70096208/dockerfile-copy-folder-if-it-exists-conditional-copy/70096420#70096420

Tested on a new repo
2024-01-08 17:09:21 -08:00

22 lines
391 B
Docker

FROM python:3.11-slim
RUN pip install poetry==1.6.1
RUN poetry config virtualenvs.create false
WORKDIR /code
COPY ./pyproject.toml ./README.md ./poetry.lock* ./
COPY ./package[s] ./packages
RUN poetry install --no-interaction --no-ansi --no-root
COPY ./app ./app
RUN poetry install --no-interaction --no-ansi
EXPOSE 8080
CMD exec uvicorn app.server:app --host 0.0.0.0 --port 8080