Skip to content

Commit eae5c54

Browse files
committed
fix(docker): another pip install is needed in docker build after copying sources
1 parent ee2b486 commit eae5c54

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

docker/Dockerfile

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,4 +99,15 @@ CMD ["invokeai-web"]
9999
COPY --link --from=web-builder /build/dist ${INVOKEAI_SRC}/invokeai/frontend/web/dist
100100

101101
# add sources last to minimize image changes on code changes
102-
COPY invokeai ${INVOKEAI_SRC}/invokeai
102+
COPY invokeai ${INVOKEAI_SRC}/invokeai
103+
104+
# this should not increase image size because we've already installed dependencies
105+
# in a previous layer
106+
RUN --mount=type=cache,target=/root/.cache/uv \
107+
--mount=type=bind,source=pyproject.toml,target=pyproject.toml \
108+
--mount=type=bind,source=uv.lock,target=uv.lock \
109+
if [ "$TARGETPLATFORM" = "linux/arm64" ] || [ "$GPU_DRIVER" = "cpu" ]; then UV_INDEX="https://download.pytorch.org/whl/cpu"; \
110+
elif [ "$GPU_DRIVER" = "rocm" ]; then UV_INDEX="https://download.pytorch.org/whl/rocm6.2"; \
111+
fi && \
112+
uv pip install -e .
113+

0 commit comments

Comments
 (0)