|
18 | 18 | - '**.py' |
19 | 19 | - 'pyproject.toml' |
20 | 20 | - 'requirements**.txt' |
| 21 | + - 'constraints-dev.txt' |
21 | 22 | - '.github/workflows/e2e-nvidia-l4-x1.yml' # This workflow |
22 | 23 | workflow_dispatch: |
23 | 24 |
|
@@ -112,45 +113,29 @@ jobs: |
112 | 113 | - name: Install ilab |
113 | 114 | working-directory: ./instructlab |
114 | 115 | run: | |
115 | | - export CUDA_HOME="/usr/local/cuda" |
116 | | - export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$CUDA_HOME/lib64:$CUDA_HOME/extras/CUPTI/lib64" |
117 | | - export PATH="$PATH:$CUDA_HOME/bin" |
118 | | - python3.11 -m venv --upgrade-deps venv |
119 | | - . venv/bin/activate |
120 | | - nvidia-smi |
121 | | - python3.11 -m pip cache remove llama_cpp_python |
122 | | -
|
123 | | - pip_install="python3.11 -m pip install -v -c constraints-dev.txt" |
124 | | -
|
125 | | - pip_install="python3.11 -m pip install -v -c constraints-dev.txt" |
126 | | -
|
127 | | - # pre-install some build dependencies |
128 | | - $pip_install packaging wheel setuptools-scm |
129 | | -
|
130 | | - # flash-attn has a bug in the setup.py that causes pip to attempt installing it |
131 | | - # before torch is installed. This is a bug because their setup.py depends on |
132 | | - # importing the module, so it should have been listed in build_requires. Alas! |
133 | | - # |
134 | | - # See: https://github.com/Dao-AILab/flash-attention/pull/958 |
135 | | - # Also: https://github.com/instructlab/instructlab/issues/1821 |
136 | | - # |
137 | | - # first, pre-install flash-attn build dependencies |
138 | | - $pip_install torch packaging setuptools wheel psutil ninja |
139 | | -
|
140 | | - # now build flash-attn using the pre-installed build dependencies; this will |
141 | | - # guarantee that the build version of torch will match the runtime version of |
142 | | - # torch; otherwise, all kinds of problems may occur, like missing symbols when |
143 | | - # accessing C extensions and such |
144 | | - $pip_install flash-attn --no-build-isolation |
145 | | -
|
146 | | - CMAKE_ARGS="-DGGML_CUDA=on" $pip_install . |
147 | | - $pip_install .[cuda] -r requirements-vllm-cuda.txt |
| 116 | + PYTHON=python3.11 ./scripts/install-ilab-with-cuda.sh |
148 | 117 | |
149 | 118 | - name: Update instructlab-eval library |
150 | 119 | working-directory: ./eval |
151 | 120 | run: | |
152 | 121 | . ../instructlab/venv/bin/activate |
153 | | - pip install -v . |
| 122 | + # Patch out our own pin from the ilab repo constraints file |
| 123 | + ilab_constraints=../instructlab/constraints-dev.txt |
| 124 | + sed -i '/instructlab-eval==/d' $ilab_constraints |
| 125 | +
|
| 126 | + # Since we reuse the virtual environment prepared using ilab |
| 127 | + # constraints, we should stick to the same constraints when |
| 128 | + # installing latest eval. |
| 129 | + # |
| 130 | + # FIX: this is not ideal; a proper fix would require decoupling the |
| 131 | + # two repos in CI: either by removing the job completely and relying |
| 132 | + # on "sdk" (no ilab) test runs; or by preparing a separate |
| 133 | + # constraints file that would consider both the requirements files |
| 134 | + # for the eval library AND for the ilab - so that they are |
| 135 | + # consistent. |
| 136 | + pip_install="pip install -c $ilab_constraints" |
| 137 | + $pip_install . |
| 138 | + $pip_install .[cuda] |
154 | 139 |
|
155 | 140 | - name: Run e2e test |
156 | 141 | working-directory: ./instructlab |
|
0 commit comments