Skip to content

Commit cd4996a

Browse files
authored
[docker] Updates docker file (deepjavalibrary#2712)
1 parent 148ac65 commit cd4996a

File tree

3 files changed

+9
-8
lines changed

3 files changed

+9
-8
lines changed

serving/docker/Dockerfile

+2-1
Original file line numberDiff line numberDiff line change
@@ -65,13 +65,14 @@ LABEL djl-serving-version=$djl_serving_version
6565
FROM base AS cpu-full
6666

6767
ARG torch_version=2.5.1
68+
ARG onnx_version=1.20.0
6869

6970
COPY scripts scripts/
7071
RUN scripts/install_python.sh && \
7172
scripts/install_djl_serving.sh $djl_version $djl_serving_version $torch_version && \
7273
djl-serving -i ai.djl.pytorch:pytorch-native-cpu:$torch_version:linux-x86_64 && \
7374
djl-serving -i ai.djl.onnxruntime:onnxruntime-engine:$djl_version && \
74-
djl-serving -i com.microsoft.onnxruntime:onnxruntime:1.19.0 && \
75+
djl-serving -i com.microsoft.onnxruntime:onnxruntime:$onnx_version && \
7576
scripts/patch_oss_dlc.sh python && \
7677
echo "${djl_serving_version} cpufull" > /opt/djl/bin/telemetry && \
7778
rm -rf /opt/djl/logs && \

serving/docker/lmi.Dockerfile

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ ARG djl_torch_version=2.5.1
1919
ARG djl_onnx_version=1.20.0
2020

2121
# djl converter wheel for text-embedding use case
22-
ARG djl_converter_wheel="https://publish.djl.ai/djl_converter/djl_converter-0.31.0-py3-none-any.whl"
22+
ARG djl_converter_wheel="https://publish.djl.ai/djl_converter/djl_converter-${djl_version//-*/}-py3-none-any.whl"
2323

2424
EXPOSE 8080
2525

@@ -34,7 +34,7 @@ ENV MODEL_LOADING_TIMEOUT=1200
3434
ENV PREDICT_TIMEOUT=240
3535
ENV DJL_CACHE_DIR=/tmp/.djl.ai
3636
# set cudnn9 library path
37-
ENV LD_LIBRARY_PATH=/usr/local/lib/python${python_version}/dist-packages/nvidia/cudnn/lib/
37+
ENV LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/local/lib/python${python_version}/dist-packages/nvidia/cudnn/lib/"
3838
ENV PYTORCH_LIBRARY_PATH=/usr/local/lib/python${python_version}/dist-packages/torch/lib
3939
ENV PYTORCH_PRECXX11=true
4040
ENV PYTORCH_VERSION=${djl_torch_version}

serving/docker/pytorch-gpu.Dockerfile

+5-5
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@ ARG djl_serving_version
1818
ARG cuda_version=cu124
1919
ARG torch_version=2.5.1
2020
ARG torch_vision_version=0.20.1
21-
ARG onnx_version=1.19.0
22-
ARG python_version=3.10
21+
ARG onnx_version=1.20.0
22+
ARG python_version=3.11
2323
ARG numpy_version=1.26.4
2424
ARG pydantic_version=2.8.2
25-
ARG djl_converter_wheel="https://publish.djl.ai/djl_converter/djl_converter-0.31.0-py3-none-any.whl"
25+
ARG djl_converter_wheel="https://publish.djl.ai/djl_converter/djl_converter-${djl_version//-*/}-py3-none-any.whl"
2626

2727
RUN mkdir -p /opt/djl/conf && \
2828
mkdir -p /opt/ml/model
@@ -36,8 +36,8 @@ ENV MODEL_SERVER_HOME=/opt/djl
3636
ENV DJL_CACHE_DIR=/tmp/.djl.ai
3737
ENV HF_HOME=/tmp/.cache/huggingface
3838
# set cudnn9 library path
39-
ENV LD_LIBRARY_PATH=/usr/local/lib/python3.10/dist-packages/nvidia/cudnn/lib/
40-
ENV PYTORCH_LIBRARY_PATH=/usr/local/lib/python3.10/dist-packages/torch/lib
39+
ENV LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/local/lib/python${python_version}/dist-packages/nvidia/cudnn/lib/"
40+
ENV PYTORCH_LIBRARY_PATH=/usr/local/lib/python${python_version}/dist-packages/torch/lib
4141
ENV PYTORCH_PRECXX11=true
4242
ENV PYTORCH_VERSION=${torch_version}
4343
ENV PYTORCH_FLAVOR=cu124-precxx11

0 commit comments

Comments
 (0)