diff --git a/Dockerfile.external b/Dockerfile.external index cf3203e87..59ef285b3 100644 --- a/Dockerfile.external +++ b/Dockerfile.external @@ -5,6 +5,7 @@ RUN pip install pipx RUN python3 -m pipx ensurepath RUN pipx install poetry ENV PATH="/root/.local/bin:$PATH" +ENV PATH=".venv/bin/:$PATH" # https://python-poetry.org/docs/configuration/#virtualenvsin-project ENV POETRY_VIRTUALENVS_IN_PROJECT=true @@ -31,6 +32,9 @@ COPY --chown=worker --from=dependencies /home/worker/app/.venv/ .venv COPY --chown=worker private_gpt/ private_gpt COPY --chown=worker fern/ fern COPY --chown=worker *.yaml *.md ./ +COPY --chown=worker scripts/ scripts + +ENV PYTHONPATH="$PYTHONPATH:/private_gpt/" USER worker -ENTRYPOINT .venv/bin/python -m private_gpt \ No newline at end of file +ENTRYPOINT python -m private_gpt \ No newline at end of file diff --git a/Dockerfile.local b/Dockerfile.local index 0b9aee4d8..66590fdbc 100644 --- a/Dockerfile.local +++ b/Dockerfile.local @@ -7,6 +7,7 @@ RUN pip install pipx RUN python3 -m pipx ensurepath RUN pipx install poetry ENV PATH="/root/.local/bin:$PATH" +ENV PATH=".venv/bin/:$PATH" # Dependencies to build llama-cpp RUN apt update && apt install -y \ @@ -42,6 +43,9 @@ COPY --chown=worker --from=dependencies /home/worker/app/.venv/ .venv COPY --chown=worker private_gpt/ private_gpt COPY --chown=worker fern/ fern COPY --chown=worker *.yaml *.md ./ +COPY --chown=worker scripts/ scripts + +ENV PYTHONPATH="$PYTHONPATH:/private_gpt/" USER worker -ENTRYPOINT .venv/bin/python -m private_gpt \ No newline at end of file +ENTRYPOINT python -m private_gpt \ No newline at end of file