Skip to content

Commit

Permalink
Merge pull request #21 from Renumics/fix/20-start-spotlight-from-docker
Browse files Browse the repository at this point in the history
Fix/20 start spotlight from docker
  • Loading branch information
druzsan authored Jul 30, 2024
2 parents c469132 + d9adc64 commit 969bf55
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ RUN pip install -IU pip setuptools wheel && pip install poetry==1.8.3
COPY pyproject.toml poetry.lock README.md ./
COPY ./assistant/__init__.py ./assistant/

RUN poetry install --extras=openai --sync --without=dev
RUN poetry install --all-extras --sync --without=dev

COPY ./assistant/ ./assistant/
COPY settings.yaml ./
Expand Down
7 changes: 4 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -58,16 +58,17 @@ build-image: ## Build docker image
.PHONY: run-image-openai
run-image-openai: ## Build docker image
run-image-openai: build-image
docker run -it --rm -e OPENAI_API_KEY=$$OPENAI_API_KEY -p 8000:8000 renumics-rag
docker run -it --rm -p 8000:8000 -p 8001:8001 --network=host -e OPENAI_API_KEY=$$OPENAI_API_KEY renumics-rag

.PHONY: run-image-azure
run-image-azure: ## Build docker image
run-image-azure: build-image
docker run -it --rm \
docker run -it --rm -p 8000:8000 -p 8001:8001 --network=host \
-e OPENAI_API_TYPE=$$OPENAI_API_TYPE \
-e OPENAI_API_VERSION=$$OPENAI_API_VERSION \
-e AZURE_OPENAI_API_KEY=$$AZURE_OPENAI_API_KEY \
-e AZURE_OPENAI_ENDPOINT=$$AZURE_OPENAI_ENDPOINT -p 8000:8000 renumics-rag
-e AZURE_OPENAI_ENDPOINT=$$AZURE_OPENAI_ENDPOINT \
renumics-rag

.PHONY: docker-login
docker-login: ## Log in to Azure registry
Expand Down
3 changes: 1 addition & 2 deletions assistant/app.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
from typing import Any, Callable, Dict, List, Optional, Type, Union, get_args

import pandas as pd
import streamlit as st
import typer
from langchain.vectorstores.chroma import Chroma
Expand Down Expand Up @@ -115,7 +114,7 @@ def get_or_create_spotlight_viewer() -> Any:
viewer.close()
return spotlight.viewers()[-1]
return spotlight.show(
pd.DataFrame({}), # Hack for Spotlight
port=8001,
no_browser=True,
dtype={
"used_by_questions": spotlight_dtypes.SequenceDType(
Expand Down

0 comments on commit 969bf55

Please sign in to comment.