diff --git a/.dockerignore b/.dockerignore index 0a5731211..210bc638b 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,6 +1,7 @@ .github/ .git/ .mypy_cache/ +.theflow/ __pycache__/ ktem_app_data/ env/ @@ -11,3 +12,4 @@ env/ README.md *.zip *.sh +venv* diff --git a/.gitignore b/.gitignore index ef2704a6f..5e8ec6a6b 100644 --- a/.gitignore +++ b/.gitignore @@ -338,6 +338,7 @@ venv/ ENV/ env.bak/ venv.bak/ +venv* # Spyder project settings .spyderproject diff --git a/Dockerfile b/Dockerfile index c28116296..d8c14aa2a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -31,16 +31,9 @@ WORKDIR /app FROM base_image as dev -COPY scripts/download_pdfjs.sh /app/scripts/download_pdfjs.sh -RUN chmod +x /app/scripts/download_pdfjs.sh - -ENV PDFJS_PREBUILT_DIR="/app/libs/ktem/ktem/assets/prebuilt/pdfjs-dist" -RUN bash scripts/download_pdfjs.sh $PDFJS_PREBUILT_DIR - COPY . /app -RUN --mount=type=ssh pip install --no-cache-dir -e "libs/kotaemon[all]" \ - && pip install --no-cache-dir -e "libs/ktem" \ - && pip install --no-cache-dir graphrag future \ - && pip install --no-cache-dir "pdfservices-sdk@git+https://github.com/niallcm/pdfservices-python-sdk.git@bump-and-unfreeze-requirements" +RUN pip install --no-cache-dir -e "libs/kotaemon[all]" -e "libs/ktem" +RUN pip install --no-cache-dir langchain-google-genai +RUN pip install --no-cache-dir graphrag future CMD ["python", "app.py"] diff --git a/scripts/docker_build.sh b/scripts/docker_build.sh new file mode 100644 index 000000000..6f04ca78f --- /dev/null +++ b/scripts/docker_build.sh @@ -0,0 +1 @@ +docker build -t ktem:1.0 --no-cache ./ diff --git a/scripts/docker_start.sh b/scripts/docker_start.sh new file mode 100644 index 000000000..10fc128af --- /dev/null +++ b/scripts/docker_start.sh @@ -0,0 +1,6 @@ +docker run \ + -e GRADIO_SERVER_NAME=0.0.0.0 \ + -e GRADIO_SERVER_PORT=7860 \ + -p 7860:7860 \ + -it \ + ktem:1.0