Skip to content

Commit

Permalink
fix(deploy): fix local and external dockerfiles
Browse files Browse the repository at this point in the history
  • Loading branch information
imartinez authored Dec 22, 2023
1 parent 4c69c45 commit fde2b94
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
6 changes: 5 additions & 1 deletion Dockerfile.external
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
ENTRYPOINT python -m private_gpt
6 changes: 5 additions & 1 deletion Dockerfile.local
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down Expand Up @@ -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
ENTRYPOINT python -m private_gpt

0 comments on commit fde2b94

Please sign in to comment.