Skip to content

Commit

Permalink
Updated copy.dockerfile with possible tar.gz extension instead of tgz
Browse files Browse the repository at this point in the history
  • Loading branch information
artanokhov committed Aug 26, 2024
1 parent 29c7a73 commit e95af96
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions templates/ubuntu18/install/copy.dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ ENV INTEL_OPENVINO_DIR /opt/intel/openvino
# Creating user openvino and adding it to groups"users"
RUN useradd -ms /bin/bash -G users openvino

RUN tar -xzf "${TEMP_DIR}"/*.tgz && \
RUN find "${TEMP_DIR}" -name "*.tgz" -o -name "*.tar.gz" -exec tar -xzf {} \; && \
OV_BUILD="$(find . -maxdepth 1 -type d -name "*openvino*" | grep -oP '(?<=_)\d+.\d+.\d.\d+')" && \
OV_YEAR="$(echo $OV_BUILD | grep -oP '^[^\d]*(\d+)')" && \
OV_FOLDER="$(find . -maxdepth 1 -type d -name "*openvino*")" && \
Expand All @@ -14,7 +14,7 @@ RUN tar -xzf "${TEMP_DIR}"/*.tgz && \
rm -rf "${TEMP_DIR:?}"/"$OV_FOLDER" && \
ln --symbolic /opt/intel/openvino_"$OV_BUILD"/ /opt/intel/openvino && \
ln --symbolic /opt/intel/openvino_"$OV_BUILD"/ /opt/intel/openvino_"$OV_YEAR" && \
rm -rf ${INTEL_OPENVINO_DIR}/tools/workbench && rm -rf ${TEMP_DIR} && \
rm -rf ${TEMP_DIR} && \
chown -R openvino /opt/intel/openvino_"$OV_BUILD"
{% if no_samples is defined or 'dev_no_samples' == distribution %}
RUN rm -rf ${INTEL_OPENVINO_DIR}/samples
Expand Down
4 changes: 2 additions & 2 deletions templates/ubuntu20/install/copy.dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ ENV INTEL_OPENVINO_DIR=/opt/intel/openvino
# Creating user openvino and adding it to groups"users"
RUN useradd -ms /bin/bash -G users openvino

RUN tar -xzf "${TEMP_DIR}"/*.tgz && \
RUN find "${TEMP_DIR}" -name "*.tgz" -o -name "*.tar.gz" -exec tar -xzf {} \; && \
OV_BUILD="$(find . -maxdepth 1 -type d -name "*openvino*" | grep -oP '(?<=_)\d+.\d+.\d.\d+')" && \
OV_YEAR="$(echo "$OV_BUILD" | grep -oP '^[^\d]*(\d+)')" && \
OV_FOLDER="$(find . -maxdepth 1 -type d -name "*openvino*")" && \
Expand All @@ -14,7 +14,7 @@ RUN tar -xzf "${TEMP_DIR}"/*.tgz && \
rm -rf "${TEMP_DIR:?}"/"$OV_FOLDER" && \
ln --symbolic /opt/intel/openvino_"$OV_BUILD"/ /opt/intel/openvino && \
ln --symbolic /opt/intel/openvino_"$OV_BUILD"/ /opt/intel/openvino_"$OV_YEAR" && \
rm -rf "${INTEL_OPENVINO_DIR}/tools/workbench" && rm -rf "${TEMP_DIR}" && \
rm -rf "${TEMP_DIR}" && \
chown -R openvino /opt/intel/openvino_"$OV_BUILD"
{% if no_samples is defined or 'dev_no_samples' == distribution %}
RUN rm -rf "${INTEL_OPENVINO_DIR}/samples"
Expand Down
4 changes: 2 additions & 2 deletions templates/ubuntu22/install/copy.dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ ENV INTEL_OPENVINO_DIR=/opt/intel/openvino
# Creating user openvino and adding it to groups"users"
RUN useradd -ms /bin/bash -G users openvino

RUN tar -xzf "${TEMP_DIR}"/*.tgz && \
RUN find "${TEMP_DIR}" -name "*.tgz" -o -name "*.tar.gz" -exec tar -xzf {} \; && \
OV_BUILD="$(find . -maxdepth 1 -type d -name "*openvino*" | grep -oP '(?<=_)\d+.\d+.\d.\d+')" && \
OV_YEAR="$(echo "$OV_BUILD" | grep -oP '^[^\d]*(\d+)')" && \
OV_FOLDER="$(find . -maxdepth 1 -type d -name "*openvino*")" && \
Expand All @@ -14,7 +14,7 @@ RUN tar -xzf "${TEMP_DIR}"/*.tgz && \
rm -rf "${TEMP_DIR:?}"/"$OV_FOLDER" && \
ln --symbolic /opt/intel/openvino_"$OV_BUILD"/ /opt/intel/openvino && \
ln --symbolic /opt/intel/openvino_"$OV_BUILD"/ /opt/intel/openvino_"$OV_YEAR" && \
rm -rf "${INTEL_OPENVINO_DIR}/tools/workbench" && rm -rf "${TEMP_DIR}" && \
rm -rf "${TEMP_DIR}" && \
chown -R openvino /opt/intel/openvino_"$OV_BUILD"
{% if no_samples is defined or 'dev_no_samples' == distribution %}
RUN rm -rf "${INTEL_OPENVINO_DIR}/samples"
Expand Down

0 comments on commit e95af96

Please sign in to comment.