forked from pytorch/serve
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reorder and fix installation process
- Loading branch information
Showing
3 changed files
with
18 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -94,10 +94,10 @@ RUN \ | |
elif echo "${BASE_IMAGE}" | grep -q "rocm/"; then \ | ||
# Install ROCm version specific binary when ROCm version is specified as a build arg | ||
if [ "$USE_ROCM_VERSION" ]; then \ | ||
python ./ts_scripts/install_dependencies.py --rocm $USE_ROCM_VERSION\ | ||
python ./ts_scripts/install_dependencies.py --rocm $USE_ROCM_VERSION;\ | ||
# Install the binary with the latest CPU image on a ROCm base image | ||
else \ | ||
python ./ts_scripts/install_dependencies.py;\ | ||
python ./ts_scripts/install_dependencies.py; \ | ||
fi; \ | ||
# Install the CPU binary | ||
else \ | ||
|
@@ -192,7 +192,6 @@ RUN --mount=type=cache,target=/var/cache/apt \ | |
&& rm -rf /var/lib/apt/lists/* \ | ||
&& cd /tmp | ||
|
||
|
||
COPY --from=compile-image /home/venv /home/venv | ||
|
||
ENV PATH="/home/venv/bin:$PATH" | ||
|
@@ -211,6 +210,7 @@ FROM ${BASE_IMAGE} as dev-image | |
ARG PYTHON_VERSION | ||
ARG BRANCH_NAME | ||
ARG BUILD_FROM_SRC | ||
ARG USE_ROCM_VERSION | ||
ARG LOCAL_CHANGES | ||
ARG BUILD_WITH_IPEX | ||
ARG IPEX_VERSION=1.11.0 | ||
|
@@ -236,9 +236,15 @@ RUN --mount=type=cache,target=/var/cache/apt \ | |
# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1009905 | ||
openjdk-17-jdk \ | ||
build-essential \ | ||
wget \ | ||
curl \ | ||
vim \ | ||
numactl \ | ||
nodejs \ | ||
npm \ | ||
zip \ | ||
unzip \ | ||
&& npm install -g [email protected] newman-reporter-htmlextra markdown-link-check \ | ||
&& if [ "$BUILD_WITH_IPEX" = "true" ]; then apt-get update && apt-get install -y libjemalloc-dev libgoogle-perftools-dev libomp-dev && ln -s /usr/lib/x86_64-linux-gnu/libjemalloc.so /usr/lib/libjemalloc.so && ln -s /usr/lib/x86_64-linux-gnu/libtcmalloc.so /usr/lib/libtcmalloc.so && ln -s /usr/lib/x86_64-linux-gnu/libiomp5.so /usr/lib/libiomp5.so; fi \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
|
@@ -253,6 +259,12 @@ RUN \ | |
COPY --from=compile-image /home/venv /home/venv | ||
ENV PATH="/home/venv/bin:$PATH" | ||
WORKDIR "serve" | ||
|
||
RUN \ | ||
if [ "$USE_ROCM_VERSION" ]; then \ | ||
python -m pip install /opt/rocm/share/amd_smi; \ | ||
fi | ||
|
||
RUN python -m pip install -U pip setuptools \ | ||
&& python -m pip install --no-cache-dir -r requirements/developer.txt \ | ||
&& python ts_scripts/install_from_src.py \ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters