driazati commented on code in PR #12663:
URL: https://github.com/apache/tvm/pull/12663#discussion_r961858368


##########
docker/Dockerfile.ci_gpu:
##########
@@ -35,13 +35,15 @@ RUN bash /install/ubuntu_install_core.sh
 COPY install/ubuntu_install_googletest.sh /install/ubuntu_install_googletest.sh
 RUN bash /install/ubuntu_install_googletest.sh
 
-COPY install/ubuntu1804_install_python.sh /install/ubuntu1804_install_python.sh
-RUN bash /install/ubuntu1804_install_python.sh
-
-# Globally disable pip cache
-RUN pip config set global.no-cache-dir false
+ENV TVM_VENV /venv/apache-tvm-py3.7
+COPY python/bootstrap/lockfiles /install/python/bootstrap/lockfiles
+COPY install/ubuntu_install_python.sh /install/ubuntu_install_python.sh
+RUN bash /install/ubuntu_install_python.sh
+ENV PATH ${TVM_VENV}/bin:$PATH
+ENV PYTHONNOUSERSITE 1  # Disable .local directory from affecting CI.
 
 COPY install/ubuntu_install_cmake_source.sh 
/install/ubuntu_install_cmake_source.sh
+# Globally disable pip cache

Review Comment:
   ```suggestion
   ```



##########
docker/install/ubuntu_install_python.sh:
##########
@@ -18,28 +18,77 @@
 
 set -e
 set -u
-# Used for debugging RVM build
-set -x
 set -o pipefail
 
-# install python and pip, don't modify this, modify install_python_package.sh
+set -x
+
+if [ -z "${TVM_VENV+x}" ]; then
+    echo "ERROR: expect TVM_VENV env var to be set"
+    exit 2
+fi
+
 apt-get update
-apt-install-and-clear -y python-dev
 
-# python 3.6
+# Ensure lsb-release is installed.
+apt-install-and-clear -y \
+    lsb-core
+
+release=$(lsb_release -sc)
+if [ "${release}" == "bionic" ]; then

Review Comment:
   What if we use miniconda instead of the distribution's Python + venv? The 
end result would be the same but we would be able to say "we use version X of 
Python in CI" instead of "it depends"



##########
docker/python/bootstrap/lockfiles/requirements-3.7.txt:
##########
@@ -0,0 +1,3 @@
+pip

Review Comment:
   why are there separate `requirements.txt`s per Python version?



-- 
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.

To unsubscribe, e-mail: [email protected]

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

Reply via email to