-
Notifications
You must be signed in to change notification settings - Fork 70
68 lines (65 loc) · 2.48 KB
/
test_inf2_tgi.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
name: Optimum neuron / Test TGI on INF2
on:
push:
branches: [ main ]
paths:
- "setup.py"
- "optimum/**.py"
- "text-generation-inference/**"
- ".github/workflows/test_inf2_tgi.yml"
pull_request:
branches: [ main ]
paths:
- "setup.py"
- "optimum/**.py"
- "text-generation-inference/**"
- ".github/workflows/test_inf2_tgi.yml"
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
do-the-job:
name: Run TGI tests
runs-on:
group: aws-inf2-8xlarge
steps:
- name: Install Neuron runtime
run: |
. /etc/os-release
sudo tee /etc/apt/sources.list.d/neuron.list > /dev/null <<EOF
deb https://apt.repos.neuron.amazonaws.com ${VERSION_CODENAME} main
EOF
wget -qO - https://apt.repos.neuron.amazonaws.com/GPG-PUB-KEY-AMAZON-AWS-NEURON.PUB | sudo apt-key add -
sudo apt-get update -y
sudo apt-get install aws-neuronx-tools=2.20.204.0 aws-neuronx-runtime-lib=2.23.110.0-9b5179492 aws-neuronx-collectives=2.23.133.0-3e70920f2 -y
dpkg -l | grep neuron
export PATH=/opt/aws/neuron/bin:$PATH
- name: Checkout
uses: actions/checkout@v2
- name: Install python and create venv
run: |
sudo apt install python3-venv python3-dev -y
python3 -m venv aws_neuron_venv_pytorch
source aws_neuron_venv_pytorch/bin/activate
python -m pip install -U pip
python -m pip config set global.extra-index-url https://pip.repos.neuron.amazonaws.com
- name: Install integration tests prerequisites
run: |
source aws_neuron_venv_pytorch/bin/activate
python -m pip install -r text-generation-inference/tests/requirements.txt
- name: Run TGI server python tests
run: |
# gawk is required when invoking the Makefile targets
sudo apt install gawk -y
source aws_neuron_venv_pytorch/bin/activate
HF_TOKEN=${{ secrets.HF_TOKEN_OPTIMUM_NEURON_CI }} make tgi_test
- name: Build docker image
shell: bash
run: |
source aws_neuron_venv_pytorch/bin/activate
make neuronx-tgi
- name: Run TGI docker tests
shell: bash
run: |
source aws_neuron_venv_pytorch/bin/activate
HF_TOKEN=${{ secrets.HF_TOKEN_OPTIMUM_NEURON_CI }} python -m pytest -sv text-generation-inference/tests -k integration