-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
42 lines (31 loc) · 1.07 KB
/
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
FROM python:3.10-slim-buster as base
ENV POETRY_HOME=/root/.poetry \
POETRY_VERSION=1.6.1 \
POETRY_NO_INTERACTION=1 \
POETRY_VIRTUALENVS_IN_PROJECT=1 \
POETRY_VIRTUALENVS_CREATE=1 \
POETRY_CACHE_DIR=/tmp/poetry_cache
WORKDIR /llmchatbot
FROM base as builder
RUN apt-get update && \
apt-get install -y make libsndfile1 && \
apt-get install gcc -y && \
rm -rf /var/lib/apt/lists/*
COPY . .
RUN pip install --no-cache-dir poetry==${POETRY_VERSION} && \
poetry config installer.max-workers 10 && \
poetry install --only=main --no-root && \
poetry build
FROM base as final
#COPY . ./
COPY --from=builder /llmchatbot/.venv ./.venv
COPY --from=builder /llmchatbot/dist/ .
COPY llmchatbot/app.py ./llmchatbot/app.py
COPY scripts ./scripts
COPY envs ./envs
RUN ./.venv/bin/pip install *.whl
# Add metadata labels
LABEL maintainer="Joseph Wang <[email protected]>" \
description="Docker image for Chatbot application" \
version="1.0.4"
ENTRYPOINT ["/bin/bash", "-c", "source .venv/bin/activate && scripts/run_app_service.sh --is_production"]