Skip to content

Commit 258afb3

Browse files
committed
Split env installation into a separate step, r3
1 parent 6e7343b commit 258afb3

File tree

6 files changed

+27
-27
lines changed

6 files changed

+27
-27
lines changed

.github/workflows/build-test-reusable.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,9 @@ jobs:
8989
key: conda-${{ inputs.env_manager }}-py${{ matrix.python }}-${{ hashFiles('scripts/triton.yml', 'python/pyproject.toml', 'python/setup.py') }}-${{ env.CACHE_NUMBER }}
9090

9191
- name: Install Manager Environment
92+
shell: bash --noprofile --norc -eo pipefail {0}
9293
run: |
93-
install-env
94+
scripts/install-${{ inputs.env_manager }}.sh --python-version ${{ inputs.python_version }}
9495
9596
- name: Print inputs
9697
run: |

scripts/install-base.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/bin/bash
2+
3+
echo Nothing to install

scripts/install-conda.sh

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#!/bin/bash
2+
3+
4+
intall_env() {
5+
conda create -n triton --override-channels -c conda-forge python=$python_version.*
6+
conda env update -f scripts/triton.yml
7+
find /opt/intel/oneapi/ \( -name '*.so' -or -name '*.so.*' \) -exec cp -n {} $HOME/miniforge3/envs/triton/lib \;
8+
ln -snf /usr/include/level_zero $HOME/miniforge3/envs/triton/bin/../x86_64-conda-linux-gnu/sysroot/usr/include/level_zero
9+
find /usr -name libze_\* -exec cp -n {} $HOME/miniforge3/envs/triton/lib \;
10+
}
11+
12+
print_env_info() {
13+
conda info
14+
conda list -n triton
15+
}
16+
17+
script_dir=$(dirname "$0")
18+
source "$script_dir/run-util.sh"
19+
20+
install_env
21+
print_env_info

scripts/run-base.sh

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
11
#!/bin/bash
22

3-
install_env() {
4-
:
5-
}
6-
73
source /opt/intel/oneapi/setvars.sh >/dev/null
8-
set -vx
4+
95
script_dir=$(dirname "$0")
106
source "$script_dir/run-util.sh"
117
source "$script_name"

scripts/run-conda.sh

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,7 @@
11
#!/bin/bash
22

3-
install_env() {
4-
conda create -n triton --override-channels -c conda-forge python=$python_version.*
5-
conda env update -f scripts/triton.yml
6-
find /opt/intel/oneapi/ \( -name '*.so' -or -name '*.so.*' \) -exec cp -n {} $HOME/miniforge3/envs/triton/lib \;
7-
ln -snf /usr/include/level_zero $HOME/miniforge3/envs/triton/bin/../x86_64-conda-linux-gnu/sysroot/usr/include/level_zero
8-
find /usr -name libze_\* -exec cp -n {} $HOME/miniforge3/envs/triton/lib \;
9-
}
10-
113
source /opt/intel/oneapi/setvars.sh >/dev/null
124

13-
set -vx
14-
155
script_dir=$(dirname "$0")
166
source "$script_dir/run-util.sh"
177

scripts/run-util.sh

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
1-
print_env_info() {
2-
conda info
3-
conda list -n triton
4-
}
5-
set -vx
61
while [ -v 1 ]; do
72
case "$1" in
83
--python-version)
@@ -16,9 +11,3 @@ while [ -v 1 ]; do
1611
esac
1712
done
1813

19-
if [ $(head -1 "$script_name") = install-env ]
20-
then
21-
install_env
22-
print_env_info
23-
exit 0
24-
fi

0 commit comments

Comments
 (0)