leandron commented on a change in pull request #6342:
URL: https://github.com/apache/incubator-tvm/pull/6342#discussion_r480982502



##########
File path: docker/bash.sh
##########
@@ -75,6 +75,27 @@ else
     CI_PY_ENV=""
 fi
 
+if [[ "${DOCKER_IMAGE_NAME}" == *"demo_vitis_ai"* && -d "/dev/shm" && -d 
"/opt/xilinx/dsa" && -d "/opt/xilinx/overlaybins" ]]; then
+    WORKSPACE_VOLUMES="-v /dev/shm:/dev/shm -v /opt/xilinx/dsa:/opt/xilinx/dsa 
-v /opt/xilinx/overlaybins:/opt/xilinx/overlaybins"

Review comment:
       One option - out of scope for this specific patch: have a 1:1 function 
that will do "all that is special about dealing with this specific image."
   
   In this case, `bash.sh` will still be self contained, but we know that some 
logic (as a function) is only executed if the image requires it.
   
   ```
   enable_other_custom_image()
   {
     # do all that is requested to enable this image
   }
   
   enable_vitis_ai()
   {
     # do all that is requested to enable this image
   }
   
   # we only add entries here if there is something special to do about a 
specific image
   case "${DOCKER_IMAGE_NAME}" in
     "demo_vitis_ai")
       enable_vitis_ai()
       ;;
     "other_custom_image")
       enable_other_custom_image()
       ;;
     ... 
   esac 
   ```




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to