Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added EMBEDDING_MODEL to streamlit-app build #155

Merged
merged 2 commits into from
Mar 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ services:
build:
context: .
dockerfile: ./streamlit_app/Dockerfile
args:
- EMBEDDING_MODEL=${EMBEDDING_MODEL:-}
env_file:
- .env
ports:
Expand Down
4 changes: 2 additions & 2 deletions streamlit_app/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ ADD pyproject.toml poetry.lock ./
RUN --mount=type=cache,target=$POETRY_CACHE_DIR poetry install --no-root --no-ansi --with streamlit-app,ai,ingester --without dev,worker,api --no-root

FROM python:3.11-slim-buster as runtime
ARG EMBEDDING_MODEL

RUN apt-get update
RUN apt-get install -y libgl-dev libmagic-dev inetutils-ping
Expand All @@ -27,8 +28,7 @@ COPY --from=builder ${VIRTUAL_ENV} ${VIRTUAL_ENV}

ADD redbox/ /app/redbox
ADD download_embedder.py /app/
RUN python download_embedder.py

RUN python download_embedder.py --model_name ${EMBEDDING_MODEL}
ADD streamlit_app/ /app

EXPOSE 8501
Expand Down
Loading