diff --git a/docker/Dockerfile.cuda-torchserve b/docker/Dockerfile.cuda-torchserve index 7694183..38f5fc8 100644 --- a/docker/Dockerfile.cuda-torchserve +++ b/docker/Dockerfile.cuda-torchserve @@ -2,7 +2,7 @@ FROM nvidia/cuda:11.8.0-runtime-ubuntu22.04 ENV DEBIAN_FRONTEND=noninteractive WORKDIR /root COPY torchserve/install-torchserve.sh /torchserve/install-torchserve.sh -RUN /torchserve/install-torchserve.sh --cuda cu118 +RUN --mount=type=cache,target=/root/.cache /torchserve/install-torchserve.sh --cuda cu118 RUN /usr/local/bin/torchserve --help COPY torchserve/config.properties /torchserve/config.properties COPY torchserve/torchserve-entrypoint.sh /torchserve/torchserve-entrypoint.sh diff --git a/docker/Dockerfile.orin-torchserve b/docker/Dockerfile.orin-torchserve index c21261b..f9e4d82 100644 --- a/docker/Dockerfile.orin-torchserve +++ b/docker/Dockerfile.orin-torchserve @@ -2,7 +2,7 @@ FROM nvcr.io/nvidia/l4t-pytorch:r35.2.1-pth2.0-py3 ENV DEBIAN_FRONTEND=noninteractive WORKDIR /root COPY torchserve/install-orin-torchserve.sh /torchserve/install-orin-torchserve.sh -RUN /torchserve/install-orin-torchserve.sh +RUN --mount=type=cache,target=/root/.cache /torchserve/install-orin-torchserve.sh RUN /usr/local/bin/torchserve --help COPY torchserve/config.properties /torchserve/config.properties COPY torchserve/torchserve-entrypoint.sh /torchserve/torchserve-entrypoint.sh diff --git a/docker/Dockerfile.rocm-torchserve b/docker/Dockerfile.rocm-torchserve index e87fab1..de4305b 100644 --- a/docker/Dockerfile.rocm-torchserve +++ b/docker/Dockerfile.rocm-torchserve @@ -2,7 +2,7 @@ FROM rocm/pytorch:latest ENV DEBIAN_FRONTEND=noninteractive WORKDIR /root COPY torchserve/install-rocm-torchserve.sh /torchserve/install-rocm-torchserve.sh -RUN /torchserve/install-rocm-torchserve.sh +RUN --mount=type=cache,target=/root/.cache /torchserve/install-rocm-torchserve.sh RUN torchserve --help COPY torchserve/config.properties /torchserve/config.properties COPY torchserve/torchserve-rocm-entrypoint.sh /torchserve/torchserve-entrypoint.sh diff --git a/docker/Dockerfile.torchserve b/docker/Dockerfile.torchserve index 5203ef0..f79897a 100644 --- a/docker/Dockerfile.torchserve +++ b/docker/Dockerfile.torchserve @@ -2,7 +2,7 @@ FROM ubuntu:22.04 ENV DEBIAN_FRONTEND=noninteractive WORKDIR /root COPY torchserve/install-torchserve.sh /torchserve/install-torchserve.sh -RUN /torchserve/install-torchserve.sh +RUN --mount=type=cache,target=/root/.cache /torchserve/install-torchserve.sh RUN /usr/local/bin/torchserve --help COPY torchserve/config.properties /torchserve/config.properties COPY torchserve/torchserve-entrypoint.sh /torchserve/torchserve-entrypoint.sh diff --git a/torchserve/install-orin-torchserve.sh b/torchserve/install-orin-torchserve.sh index d481d73..3d52c5f 100755 --- a/torchserve/install-orin-torchserve.sh +++ b/torchserve/install-orin-torchserve.sh @@ -12,7 +12,6 @@ apt-get update && \ pip install "opencv-python<4.8.0.76" && \ echo /usr/local/lib/python3.8/dist-packages/opencv_python.libs > /etc/ld.so.conf.d/opencv.conf && \ ldconfig && \ - pip config set global.no-cache-dir false && \ git clone https://github.com/pytorch/serve -b v0.9.0 && \ cd serve && \ pip install -r requirements/common.txt && \ diff --git a/torchserve/install-rocm-torchserve.sh b/torchserve/install-rocm-torchserve.sh index b048fb4..322a3f7 100755 --- a/torchserve/install-rocm-torchserve.sh +++ b/torchserve/install-rocm-torchserve.sh @@ -5,7 +5,6 @@ apt-get update && \ apt-get install -y \ git \ python3-pip && \ - pip config set global.no-cache-dir false && \ git clone https://github.com/pytorch/serve -b v0.9.0 && \ cd serve && \ cp /dev/null requirements/torch_linux.txt && \ diff --git a/torchserve/install-torchserve.sh b/torchserve/install-torchserve.sh index ba2dc13..94abc80 100755 --- a/torchserve/install-torchserve.sh +++ b/torchserve/install-torchserve.sh @@ -5,7 +5,6 @@ apt-get update && \ apt-get install -y \ git \ python3-pip && \ - pip config set global.no-cache-dir false && \ git clone https://github.com/pytorch/serve -b v0.9.0 && \ cd serve && \ python3 ./ts_scripts/install_dependencies.py --environment prod $* && \