Skip to content

Commit

Permalink
Merge pull request #10 from anarkiwi/bc
Browse files Browse the repository at this point in the history
add build cache.
  • Loading branch information
anarkiwi authored Dec 5, 2023
2 parents 6a52f9b + a900a33 commit e31c535
Show file tree
Hide file tree
Showing 7 changed files with 4 additions and 7 deletions.
2 changes: 1 addition & 1 deletion docker/Dockerfile.cuda-torchserve
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion docker/Dockerfile.orin-torchserve
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion docker/Dockerfile.rocm-torchserve
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion docker/Dockerfile.torchserve
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion torchserve/install-orin-torchserve.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 && \
Expand Down
1 change: 0 additions & 1 deletion torchserve/install-rocm-torchserve.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 && \
Expand Down
1 change: 0 additions & 1 deletion torchserve/install-torchserve.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 $* && \
Expand Down

0 comments on commit e31c535

Please sign in to comment.