Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update ubuntu Docker tag to v24 #22

Merged
merged 3 commits into from
May 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion docker/Dockerfile.cuda-torchserve
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,15 @@ FROM nvidia/cuda:12.4.0-runtime-ubuntu22.04
ARG PIP_CACHE
ENV DEBIAN_FRONTEND=noninteractive
WORKDIR /root
ENV PYENV_ROOT="/pyenv"
ENV PATH="${PATH}:${PYENV_ROOT}/bin:${PYENV_ROOT}/shims"
COPY torchserve/pipcacheconfig.sh /torchserve/pipcacheconfig.sh
COPY torchserve/clone-torchserve.sh /torchserve/clone-torchserve.sh
COPY torchserve/install-common.sh /torchserve/install-common.sh
COPY torchserve/install-torchserve.sh /torchserve/install-torchserve.sh
RUN /torchserve/pipcacheconfig.sh
RUN --mount=type=cache,target=/root/.cache /torchserve/install-torchserve.sh --cuda cu121
RUN /usr/local/bin/torchserve --help
RUN $(which torchserve) --help
COPY torchserve/config.properties /torchserve/config.properties
COPY torchserve/torchserve-entrypoint.sh /torchserve/torchserve-entrypoint.sh
COPY torchserve/healthcheck.sh /torchserve/healthcheck.sh
Expand Down
7 changes: 5 additions & 2 deletions docker/Dockerfile.torchserve
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
FROM ubuntu:22.04
FROM ubuntu:24.04
ARG PIP_CACHE
ENV DEBIAN_FRONTEND=noninteractive
WORKDIR /root
ENV PYENV_ROOT="/pyenv"
ENV PATH="${PATH}:${PYENV_ROOT}/bin:${PYENV_ROOT}/shims"
COPY torchserve/pipcacheconfig.sh /torchserve/pipcacheconfig.sh
COPY torchserve/clone-torchserve.sh /torchserve/clone-torchserve.sh
COPY torchserve/install-common.sh /torchserve/install-common.sh
COPY torchserve/install-torchserve.sh /torchserve/install-torchserve.sh
RUN /torchserve/pipcacheconfig.sh
RUN --mount=type=cache,target=/root/.cache /torchserve/install-torchserve.sh
RUN /usr/local/bin/torchserve --help
# ENTRYPOINT ["tail", "-f", "/dev/null"]
RUN $(which torchserve) --help
COPY torchserve/config.properties /torchserve/config.properties
COPY torchserve/torchserve-entrypoint.sh /torchserve/torchserve-entrypoint.sh
COPY torchserve/healthcheck.sh /torchserve/healthcheck.sh
Expand Down
2 changes: 1 addition & 1 deletion torchserve/clone-torchserve.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
#!/bin/sh
git clone https://github.com/pytorch/serve -b v0.10.0
git clone --depth=1 https://github.com/pytorch/serve -b v0.10.0
9 changes: 8 additions & 1 deletion torchserve/install-torchserve.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,14 @@ set -e
apt-get update && \
apt-get install -y \
git \
python3-pip && \
curl \
gcc g++ libev-dev libyaml-dev tini ca-certificates \
libjpeg-dev build-essential zlib1g-dev libffi-dev libssl-dev libbz2-dev libreadline-dev libsqlite3-dev liblzma-dev && \
export PYENV_ROOT="/pyenv" && \
curl https://pyenv.run | bash && \
export PATH="${PATH}:${PYENV_ROOT}/bin:${PYENV_ROOT}/shims" && \
pyenv install 3.11 && \
pyenv global 3.11 && \
$(dirname $0)/clone-torchserve.sh && \
cd serve && \
python3 ./ts_scripts/install_dependencies.py --environment prod $* && \
Expand Down
2 changes: 1 addition & 1 deletion torchserve/torchserve-entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
#!/bin/sh
exec /usr/local/bin/torchserve --start --model-store /model_store --ts-config /torchserve/config.properties --ncs --foreground $*
exec $(which torchserve) --start --model-store /model_store --ts-config /torchserve/config.properties --ncs --foreground $*