Skip to content

Commit 9fa0a70

Browse files
[CI] use latest docker (#104)
* [CI] use self-hosted runner * [CI] mount volumes
1 parent 9addb20 commit 9fa0a70

1 file changed

Lines changed: 19 additions & 51 deletions

File tree

.github/workflows/unit_tests.yml

Lines changed: 19 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,10 @@ on:
1111

1212
env:
1313
CUDA_DEVICE_ORDER: PCI_BUS_ID
14-
MAX_JOBS: 4
1514
RUNNER: 10.0.13.31
15+
UV_TORCH_BACKEND: cu130
16+
PYTHON_VERSION: 3.14t
17+
UV_PYTHON: 3.14t
1618

1719
concurrency:
1820
group: ${{ github.ref }}-workflow-unit-tests
@@ -107,65 +109,31 @@ jobs:
107109
gpu:
108110
runs-on: [self-hosted, Linux]
109111
container:
110-
image: 10.0.13.31:5000/nvidia/cuda:130-ubuntu22.04_1021
112+
image: 10.0.13.31:5000/nvidia/cuda:130-ubuntu24.04_0325
111113
options: --device /dev/dri --ipc=host --runtime=nvidia --gpus all
112114
volumes:
115+
- /monster/ci/env/entrypoint.sh:/entrypoint.sh
116+
- /monster/ci/env/entrypoint.sh:/etc/profile.d/01-entrypoint.sh
113117
- /dev/dri/by-path:/dev/dri/by-path
114-
- /monster/ci/pyenv:/opt/pyenv
118+
- /monster/ci/models:/monster/data/model
119+
- /monster/ci/dataset:/monster/data/model/dataset
120+
- /monster/ci/huggingface:/github/home/.cache/huggingface
121+
- /monster/ci/uv:/opt/uv
122+
- /monster/ci/env:/opt/env
123+
- /monster/ci/dist:/opt/dist
115124
steps:
116-
- name: Print Env
117-
run: |
118-
echo "::group::pyenv versions"
119-
pyenv versions
120-
echo "::endgroup::"
121-
122-
python_version=3.14
123-
if [[ "$python_version" != *"."* ]]; then
124-
python_version="${python_version/3/3.}"
125-
fi
126-
env_name="cu130_torch2.9.0_py314_devicesmi_gpu"
127-
128-
echo "env name: $env_name"
129-
130-
if [ -d "$(pyenv root)/versions/$env_name" ]; then
131-
echo "env exists, skip"
132-
pyenv local $env_name
133-
pyenv activate $env_name
134-
else
135-
echo "creating venv..."
136-
pyenv virtualenv "$python_version" "$env_name"
137-
pyenv local $env_name
138-
pyenv activate $env_name
139-
bash -c "$(curl -L http://${RUNNER}/scripts/env/init_compiler.sh)" @ 130 2.9.0 314
140-
fi
141-
142-
pyenv local $env_name
143-
pyenv activate $env_name
144-
145-
echo "::group::pyenv versions"
146-
pyenv versions
147-
echo "::endgroup::"
148-
149-
echo "== python =="
150-
python --version
151-
152-
echo "== nvcc =="
153-
nvcc --version
154-
155-
echo "== torch =="
156-
pip show torch
157-
158-
echo "::group::pip list"
159-
pip list
160-
echo "::endgroup::"
161-
162125
- uses: actions/checkout@v6
163126

164-
- name: install pciutils
127+
- name: Activate uv env
128+
run: |
129+
env_name="${{ env.UV_TORCH_BACKEND }}_torch_latest_py${{ env.PYTHON_VERSION }}_build"
130+
/opt/uv/setup_uv_venv.sh $env_name
131+
132+
- name: Install pciutils
165133
run: apt update && apt install -y pciutils
166134

167135
- name: install
168-
run: pip install . pytest
136+
run: uv pip install . pytest
169137

170138
- name: test os
171139
run: pytest tests/test_os.py

0 commit comments

Comments
 (0)