diff --git a/docker/dockerfiles/Dockerfile_opensource_image.template b/docker/dockerfiles/Dockerfile_opensource_image.template index 12b54d41..67e1ec87 100644 --- a/docker/dockerfiles/Dockerfile_opensource_image.template +++ b/docker/dockerfiles/Dockerfile_opensource_image.template @@ -1,3 +1,10 @@ +FROM node:14-alpine AS client_builder +ENV CLIENT_FOLDER /root/client +COPY client ${CLIENT_FOLDER} +WORKDIR ${CLIENT_FOLDER} +RUN npm ci +RUN DL_PROFILER_BACKEND_STATIC_PATH=${CLIENT_FOLDER}/static/ npm run pack + FROM ubuntu:20.04 SHELL ["/bin/bash", "+x", "-c"] @@ -78,6 +85,9 @@ RUN apt update && \ RUN sed -Ei 's/# deb-src /deb-src /' /etc/apt/sources.list && \ apt update && \ apt install -y --no-install-recommends ${DEPENDENCIES} && \ + curl -L https://raw.githubusercontent.com/openvinotoolkit/openvino/master/scripts/install_dependencies/install_NEO_OCL_driver.sh -o /tmp/install_NEO_OCL_driver.sh && \ + chmod +x /tmp/install_NEO_OCL_driver.sh && \ + bash /tmp/install_NEO_OCL_driver.sh -y && \ apt source gettext-base && \ apt remove -y dpkg-dev && \ apt clean && \ @@ -92,6 +102,9 @@ ADD --chown=workbench setupvars.sh ${INTEL_OPENVINO_DIR}/ WORKDIR ${INTEL_OPENVINO_DIR}/tools ADD --chown=workbench workbench ${OPENVINO_WORKBENCH_ROOT}/ +WORKDIR ${OPENVINO_WORKBENCH_ROOT} +COPY --from=client_builder --chown=workbench /root/client/static ./static/ + RUN python3 -m pip install pip==19.3.1 # COPY JUPYTER USER SETTINGS diff --git a/docker/local/build_image.sh b/docker/local/build_image.sh index d092c64a..e295da8a 100755 --- a/docker/local/build_image.sh +++ b/docker/local/build_image.sh @@ -27,24 +27,20 @@ done set -e +echo echo -e "${TERMINAL_COLOR_MESSAGE} The script must be run from the root folder of the Workbench ${TERMINAL_COLOR_CLEAR}" -echo -e "${TERMINAL_COLOR_MESSAGE} Also install 'NVM' from the repository 'https://github.com/nvm-sh/nvm' and install the client dependencies in the client folder with the following command: 'npm install'${TERMINAL_COLOR_CLEAR}" echo ROOT_FOLDER="${PWD}" pushd ${ROOT_FOLDER} - pushd client - source ${NVM_DIR}/nvm.sh && nvm use 14 - DL_PROFILER_BACKEND_STATIC_PATH=../static/ npm run pack - popd - if [ -d $TEMP_FOLDER ]; then rm -rf $TEMP_FOLDER fi mkdir $TEMP_FOLDER pushd $TEMP_FOLDER rsync -av --progress ${ROOT_FOLDER} ./ --exclude={'venv','venv_tf2','tests','client','.git','wb/data','.venv','.unified_venv'} + rsync -av --progress ${ROOT_FOLDER}/client ./ --exclude={'node_modules','.idea','.git','e2e'} VERSIONS_FILE="${ROOT_FOLDER}/automation/Jenkins/openvino_version.yml" @@ -92,4 +88,4 @@ pushd ${ROOT_FOLDER} popd echo "To run the image, execute the following command:" -echo "docker rm local_build || true && openvino-workbench --image ${IMAGE_NAME}:${IMAGE_TAG} --container-name local_build" +echo "docker rm local_build || true && openvino-workbench --image ${IMAGE_NAME}:${IMAGE_TAG} --container-name local_build --enable-gpu"