another one #148
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # This workflow will install Python dependencies, run tests and lint with a single version of Python | |
| # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python | |
| name: Python application | |
| on: | |
| push: | |
| pull_request: | |
| branches: [ "master" ] | |
| workflow_dispatch: | |
| # env: | |
| # LAMINO_ALIGN_DATA_DIR: /local/ci_tests/pyxalign/ | |
| permissions: | |
| contents: read | |
| jobs: | |
| build: | |
| runs-on: self-hosted | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: setup | |
| run: | | |
| source ~/.bashrc | |
| echo $PYXALIGN_CI_TEST_DATA_DIR | |
| export CUDA_VISIBLE_DEVICES=1 | |
| - name: build container | |
| run: | | |
| echo \ | |
| "test two liner" | |
| podman images | |
| podman build -t pyxalign-actions-runner-image . | |
| - name: start container | |
| run: | | |
| podman run -it --rm --env DISPLAY --security-opt \ | |
| label=type:container_runtime_t --network host \ | |
| --device nvidia.com/gpu=all \ | |
| -v="$HOME/.Xauthority:/root/.Xauthority:rw" \ | |
| -v=$PYXALIGN_CI_TEST_DATA_DIR:$PYXALIGN_CI_TEST_DATA_DIR \ | |
| pyxalign-actions-runner-image:latest pytest | |
| # - name: container cleanup | |
| # run: | | |
| # podman rmi pyxalign-actions-runner-image | |
| # Use something like this. I also need to update it to mount the data directory. | |
| # podman run -it --rm --env DISPLAY --security-opt label=type:container_runtime_t --network host -v="$HOME/.Xauthority:/root/.Xauthority:rw" --device nvidia.com/gpu=all pyxalign:latest bash |