Skip to content

Commit

Permalink
Add gpu linux tests in github actions
Browse files Browse the repository at this point in the history
Summary:

Pull Request: #5293

Migrate circleci gpu test to github actions
the rocm version of torch was being installed earlier:
 {F1644370316} 

Now torch should be the cuda version

Differential Revision: D57598325
  • Loading branch information
Eric Zhang authored and facebook-github-bot committed May 21, 2024
1 parent 219404e commit 5f90fcc
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
19 changes: 19 additions & 0 deletions .github/actions/install_linux_gpu_dep/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: "Install GPU Dependencies"
env:
DISTRO: "ubuntu2004"
ARCH: "x86_64"
runs:
using: composite
steps:
- name: Install GPU Dependencies
shell: bash
run: |
uname -r
# https://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html#network-repo-installation-for-ubuntu
# wget https://developer.download.nvidia.com/compute/cuda/repos/"$DISTRO"/"$ARCH"/cuda-keyring_1.1-1_all.deb
# sudo dpkg -i cuda-keyring_1.1-1_all.deb

sudo apt-get update
sudo apt-get install cuda-toolkit
sudo apt-get install nvidia-gds
5 changes: 4 additions & 1 deletion .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ jobs:
- torch: "2.2.2"
torchvision: "0.17.2"
env:
PYTORCH_INDEX: "https://download.pytorch.org/whl/torch_stable.html"
PYTORCH_INDEX: "https://download.pytorch.org/whl/cu118"
DETECTRON2_DATASETS: ~/.torch/datasets
steps:
- name: Checkout
Expand All @@ -117,6 +117,9 @@ jobs:
~/.torch
key: ${{ runner.os }}-torch${{ matrix.torch }}-${{ hashFiles('setup.py') }}-20210827

- name: Install GPU Dependencies
uses: ./.github/actions/install_linux_gpu_dep

- name: Install Dependencies
uses: ./.github/actions/install_linux_dep
if: steps.load-cache.outputs.cache-hit != 'true'
Expand Down

0 comments on commit 5f90fcc

Please sign in to comment.