-
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Dockerfile
25 lines (23 loc) · 811 Bytes
/
Dockerfile
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
FROM coolbeevip/langchain-cpu:3.11-0.1.14 as builder
RUN cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
WORKDIR /usr/app/langchain-lab
RUN python -m venv /usr/app/venv
ENV PATH="/usr/app/venv/bin:$PATH"
COPY pyproject.toml .
COPY poetry.lock .
COPY src src
COPY main.py main.py
COPY README.md README.md
COPY .streamlit .streamlit
RUN pip install .
FROM python:3.11-slim as production
RUN cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
WORKDIR /usr/app/langchain-lab
COPY --from=builder /usr/app/venv ../venv
COPY --from=builder /usr/app/langchain-lab/src src
COPY --from=builder /usr/app/langchain-lab/main.py main.py
COPY --from=builder /usr/app/langchain-lab/.streamlit .streamlit
EXPOSE 8080
ENV PYTHONPATH=${PYTHONPATH}:.
ENV PATH="/usr/app/venv/bin:$PATH"
CMD [ "streamlit", "run", "main.py" ]