Skip to content

Commit

Permalink
[Fix] Add --no-index to pip install commands (#3096)
Browse files Browse the repository at this point in the history
This PR adds the field `--no-index` to mlc-ai/mlc-llm pip install
commands to bypass PyPI.
  • Loading branch information
MasterJH5574 authored Jan 20, 2025
1 parent 24d0796 commit b8838a1
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 23 deletions.
2 changes: 1 addition & 1 deletion ci/task/pylint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export PYTHONPATH="./python":${PYTHONPATH:-""}
if [[ -n ${MLC_CI_SETUP_DEPS:-} ]]; then
echo "MLC_CI_SETUP_DEPS=1 start setup deps"
# TVM Unity is a dependency to this testing
pip install --quiet --pre -U -f https://mlc.ai/wheels mlc-ai-nightly-cpu
pip install --quiet --pre -U --no-index -f https://mlc.ai/wheels mlc-ai-nightly-cpu
pip install --quiet --pre -U cuda-python
fi

Expand Down
14 changes: 7 additions & 7 deletions ci/task/test_model_compile.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,32 +9,32 @@ pip install --force-reinstall wheels/*.whl

if [[ ${GPU} == cuda* ]]; then
TARGET=cuda
pip install --pre -U -f https://mlc.ai/wheels mlc-ai-nightly-cu123
pip install --pre -U --no-index -f https://mlc.ai/wheels mlc-ai-nightly-cu123
export LD_LIBRARY_PATH=/usr/local/cuda/compat/:$LD_LIBRARY_PATH
elif [[ ${GPU} == rocm* ]]; then
TARGET=rocm
pip install --pre -U -f https://mlc.ai/wheels mlc-ai-nightly-rocm57
pip install --pre -U --no-index -f https://mlc.ai/wheels mlc-ai-nightly-rocm57
elif [[ ${GPU} == metal ]]; then
TARGET=metal
pip install --pre -U --force-reinstal -f https://mlc.ai/wheels mlc-ai-nightly-cpu
pip install --pre -U --force-reinstall -f https://mlc.ai/wheels mlc-ai-nightly-cpu
elif [[ ${GPU} == wasm* ]]; then
TARGET=wasm
pip install --pre -U -f https://mlc.ai/wheels mlc-ai-nightly-cpu
pip install --pre -U --no-index -f https://mlc.ai/wheels mlc-ai-nightly-cpu
export TVM_SOURCE_DIR=$(dirname $(python -c 'import tvm; print(tvm.__file__)'))
export TVM_HOME=${TVM_SOURCE_DIR}
export MLC_LLM_SOURCE_DIR=$(pwd)
cd $TVM_SOURCE_DIR/web/ && make -j${NUM_THREADS} && cd -
cd $MLC_LLM_SOURCE_DIR/web/ && make -j${NUM_THREADS} && cd -
elif [[ ${GPU} == ios ]]; then
TARGET=ios
pip install --pre -U --force-reinstal -f https://mlc.ai/wheels mlc-ai-nightly-cpu
pip install --pre -U --force-reinstall -f https://mlc.ai/wheels mlc-ai-nightly-cpu
elif [[ ${GPU} == android* ]]; then
TARGET=android
pip install --pre -U -f https://mlc.ai/wheels mlc-ai-nightly-cpu
pip install --pre -U --no-index -f https://mlc.ai/wheels mlc-ai-nightly-cpu
source /android_env_vars.sh
else
TARGET=vulkan
pip install --pre -U -f https://mlc.ai/wheels mlc-ai-nightly-cpu
pip install --pre -U --no-index -f https://mlc.ai/wheels mlc-ai-nightly-cpu
fi

python tests/python/integration/test_model_compile.py $TARGET $NUM_THREADS
2 changes: 1 addition & 1 deletion ci/task/test_unittest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ if [[ -n ${MLC_CI_SETUP_DEPS:-} ]]; then
# Install dependency
pip install --force-reinstall wheels/*.whl
pip install --quiet pytest
pip install --pre -U -f https://mlc.ai/wheels mlc-ai-nightly-cu123
pip install --pre -U --no-index -f https://mlc.ai/wheels mlc-ai-nightly-cu123
export LD_LIBRARY_PATH=/usr/local/cuda/compat/:$LD_LIBRARY_PATH
fi

Expand Down
14 changes: 7 additions & 7 deletions docs/install/mlc_llm.rst
Original file line number Diff line number Diff line change
Expand Up @@ -30,35 +30,35 @@ Select your operating system/compute platform and run the command in your termin
.. code-block:: bash
conda activate your-environment
python -m pip install --pre -U -f https://mlc.ai/wheels mlc-llm-nightly-cpu mlc-ai-nightly-cpu
python -m pip install --pre -U --no-index -f https://mlc.ai/wheels mlc-llm-nightly-cpu mlc-ai-nightly-cpu
.. tab:: CUDA 12.2

.. code-block:: bash
conda activate your-environment
python -m pip install --pre -U -f https://mlc.ai/wheels mlc-llm-nightly-cu122 mlc-ai-nightly-cu122
python -m pip install --pre -U --no-index -f https://mlc.ai/wheels mlc-llm-nightly-cu122 mlc-ai-nightly-cu122
.. tab:: CUDA 12.3

.. code-block:: bash
conda activate your-environment
python -m pip install --pre -U -f https://mlc.ai/wheels mlc-llm-nightly-cu123 mlc-ai-nightly-cu123
python -m pip install --pre -U --no-index -f https://mlc.ai/wheels mlc-llm-nightly-cu123 mlc-ai-nightly-cu123
.. tab:: ROCm 6.1

.. code-block:: bash
conda activate your-environment
python -m pip install --pre -U -f https://mlc.ai/wheels mlc-llm-nightly-rocm61 mlc-ai-nightly-rocm61
python -m pip install --pre -U --no-index -f https://mlc.ai/wheels mlc-llm-nightly-rocm61 mlc-ai-nightly-rocm61
.. tab:: ROCm 6.2

.. code-block:: bash
conda activate your-environment
python -m pip install --pre -U -f https://mlc.ai/wheels mlc-llm-nightly-rocm62 mlc-ai-nightly-rocm62
python -m pip install --pre -U --no-index -f https://mlc.ai/wheels mlc-llm-nightly-rocm62 mlc-ai-nightly-rocm62
.. tab:: Vulkan

Expand Down Expand Up @@ -98,7 +98,7 @@ Select your operating system/compute platform and run the command in your termin
.. code-block:: bash
conda activate your-environment
python -m pip install --pre -U -f https://mlc.ai/wheels mlc-llm-nightly-cpu mlc-ai-nightly-cpu
python -m pip install --pre -U --no-index -f https://mlc.ai/wheels mlc-llm-nightly-cpu mlc-ai-nightly-cpu
.. note::

Expand All @@ -124,7 +124,7 @@ Select your operating system/compute platform and run the command in your termin
.. code-block:: bash
conda activate your-environment
python -m pip install --pre -U -f https://mlc.ai/wheels mlc-llm-nightly-cpu mlc-ai-nightly-cpu
python -m pip install --pre -U --no-index -f https://mlc.ai/wheels mlc-llm-nightly-cpu mlc-ai-nightly-cpu
.. note::
Please make sure your conda environment comes with python and pip.
Expand Down
14 changes: 7 additions & 7 deletions docs/install/tvm.rst
Original file line number Diff line number Diff line change
Expand Up @@ -37,35 +37,35 @@ A nightly prebuilt Python package of Apache TVM Unity is provided.
.. code-block:: bash
conda activate your-environment
python -m pip install --pre -U -f https://mlc.ai/wheels mlc-ai-nightly-cpu
python -m pip install --pre -U --no-index -f https://mlc.ai/wheels mlc-ai-nightly-cpu
.. tab:: CUDA 12.2

.. code-block:: bash
conda activate your-environment
python -m pip install --pre -U -f https://mlc.ai/wheels mlc-ai-nightly-cu122
python -m pip install --pre -U --no-index -f https://mlc.ai/wheels mlc-ai-nightly-cu122
.. tab:: CUDA 12.3

.. code-block:: bash
conda activate your-environment
python -m pip install --pre -U -f https://mlc.ai/wheels mlc-ai-nightly-cu123
python -m pip install --pre -U --no-index -f https://mlc.ai/wheels mlc-ai-nightly-cu123
.. tab:: ROCm 6.1

.. code-block:: bash
conda activate your-environment
python -m pip install --pre -U -f https://mlc.ai/wheels mlc-ai-nightly-rocm61
python -m pip install --pre -U --no-index -f https://mlc.ai/wheels mlc-ai-nightly-rocm61
.. tab:: ROCm 6.2

.. code-block:: bash
conda activate your-environment
python -m pip install --pre -U -f https://mlc.ai/wheels mlc-ai-nightly-rocm62
python -m pip install --pre -U --no-index -f https://mlc.ai/wheels mlc-ai-nightly-rocm62
.. tab:: Vulkan

Expand All @@ -88,7 +88,7 @@ A nightly prebuilt Python package of Apache TVM Unity is provided.
.. code-block:: bash
conda activate your-environment
python -m pip install --pre -U -f https://mlc.ai/wheels mlc-ai-nightly-cpu
python -m pip install --pre -U --no-index -f https://mlc.ai/wheels mlc-ai-nightly-cpu
.. note::

Expand All @@ -109,7 +109,7 @@ A nightly prebuilt Python package of Apache TVM Unity is provided.
.. code-block:: bash
conda activate your-environment
python -m pip install --pre -U -f https://mlc.ai/wheels mlc-ai-nightly-cpu
python -m pip install --pre -U --no-index -f https://mlc.ai/wheels mlc-ai-nightly-cpu
.. note::
Make sure you also install vulkan loader and clang to avoid vulkan
Expand Down

0 comments on commit b8838a1

Please sign in to comment.