Skip to content

Commit

Permalink
chore: purge pip cache in image
Browse files Browse the repository at this point in the history
  • Loading branch information
gitlawr committed Oct 16, 2024
1 parent 964d818 commit de9a368
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
12 changes: 7 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,15 @@ COPY dist/*.whl /tmp/

RUN if [ "$TARGETPLATFORM" = "linux/amd64" ]; then \
echo "Installing x86_64 wheel"; \
pip3 install /tmp/*_x86_64.whl vllm; \
WHEEL_PACKAGE="$(ls /tmp/*_x86_64.whl)[vllm]"; \
elif [ "$TARGETPLATFORM" = "linux/arm64" ]; then \
echo "Installing aarch64 wheel"; \
pip3 install /tmp/*_aarch64.whl; \
WHEEL_PACKAGE="$(ls /tmp/*_aarch64.whl)"; \
else \
echo "Unsupported platform: $TARGETPLATFORM"; \
fi \
&& rm /tmp/*.whl
echo "Unsupported platform: $TARGETPLATFORM" && exit 1; \
fi && \
pip3 install $WHEEL_PACKAGE &&\
rm /tmp/*.whl && \
pip3 cache purge

ENTRYPOINT [ "gpustack", "start" ]
7 changes: 7 additions & 0 deletions hack/build-docker.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/env bash

set -o errexit
set -o nounset
set -o pipefail

docker buildx build -t gpustack/gpustack:dev -f Dockerfile --platform linux/amd64,linux/arm64 .

0 comments on commit de9a368

Please sign in to comment.