Skip to content

Commit 87aa653

Browse files
committed
Add additional steps in prod.Dockerfile to ensure dependencies are copied over
1 parent a552543 commit 87aa653

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

prod.Dockerfile

+3-2
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ ENV PIP_EXTRA_INDEX_URL="https://download.pytorch.org/whl/cpu https://abetlen.gi
3131
# avoid downloading unused cuda specific python packages
3232
ENV CUDA_VISIBLE_DEVICES=""
3333
RUN sed -i "s/dynamic = \\[\"version\"\\]/version = \"$VERSION\"/" pyproject.toml && \
34-
pip install --no-cache-dir .[prod]
34+
pip install --no-cache-dir -e .[prod]
3535

3636
# Build Web App
3737
FROM node:20-alpine AS web-app
@@ -48,9 +48,10 @@ RUN yarn build
4848

4949
# Merge the Server and Web App into a Single Image
5050
FROM base
51-
ENV PYTHONPATH=/app/src
51+
ENV PYTHONPATH=/app/src:$PYTHONPATH
5252
WORKDIR /app
5353
COPY --from=server-deps /usr/local/lib/python3.10/dist-packages /usr/local/lib/python3.10/dist-packages
54+
COPY --from=server-deps /usr/local/bin /usr/local/bin
5455
COPY --from=web-app /app/src/interface/web/out ./src/khoj/interface/built
5556
COPY . .
5657
RUN cd src && python3 khoj/manage.py collectstatic --noinput

0 commit comments

Comments
 (0)