This repository has been archived by the owner on Jun 10, 2024. It is now read-only.
add nbc pypi (#516) #305
This file contains 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
name: docker | |
on: | |
push: | |
branches: [ "master" ] | |
pull_request: | |
branches: [ "master" ] | |
# Cancel any in-progress CI runs for a PR if it is updated | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }} | |
cancel-in-progress: true | |
jobs: | |
docker: | |
# The CMake configure and build commands are platform agnostic and should work equally well on Windows or Mac. | |
# You can convert this to a matrix build if you need cross-platform coverage. | |
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix | |
runs-on: self-hosted | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Build docker containers | |
run: | | |
DOCKER_BUILDKIT=1 docker build -f docker/Dockerfile --tag vpf-gpu --build-arg PIP_INSTALL_EXTRAS=torch . | |
DOCKER_BUILDKIT=1 docker build -f docker/Dockerfile.tensorrt --build-arg PIP_INSTALL_EXTRAS=samples --tag vpf-gpu-trt . | |
- name: Run tests | |
run: | | |
docker run --gpus all --rm --user $UID -v $GITHUB_WORKSPACE:/cwd --entrypoint "python3" vpf-gpu -m unittest discover /cwd/tests | |
- name: Run samples | |
run: | | |
docker run --gpus all --rm --user $UID -v $GITHUB_WORKSPACE:/cwd \ | |
-e TORCH_HOME=/cwd/cache \ | |
--entrypoint "make" vpf-gpu-trt run_samples_without_docker | |