Skip to content

Commit

Permalink
Update wheels-generator.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
OutofAi authored May 11, 2024
1 parent a7fefed commit 5054026
Showing 1 changed file with 45 additions and 9 deletions.
54 changes: 45 additions & 9 deletions .github/workflows/wheels-generator.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,20 @@
name: CI

on:
workflow_dispatch:

env:
TINY_CUDA_NN_VERSION: "1.7.0"

jobs:

# build-tag:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v3
# with:
# fetch-depth: 0

# - name: Install GitHub CLI
# run: |
# sudo apt-get update
Expand All @@ -28,7 +31,7 @@ jobs:
# prerelease: false

# build_windows:
# needs: build-tag
# #needs: build-tag
# name: Build on Windows
# runs-on: ${{ matrix.os }}
# strategy:
Expand Down Expand Up @@ -74,7 +77,6 @@ jobs:
# with:
# python-version: ${{ matrix.python-version }}


# - name: List Visual Studio installations
# run: |
# & "C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe" -products * -legacy -format text
Expand Down Expand Up @@ -126,7 +128,6 @@ jobs:
# run: echo "CUDA_HOME=C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.2" >> $env:GITHUB_ENV
# shell: pwsh


# - name: Generate latest Wheels
# run: |
# cd bindings/torch
Expand All @@ -151,14 +152,19 @@ jobs:
# shell: pwsh

build_linux:
# needs: build-tag
#needs: build-tag
name: Build on linux systems
runs-on: ${{ matrix.os }}
container:
image: ${{ matrix.cuda }}
strategy:
matrix:
include:
- os: ubuntu-latest
cuda: nvidia/cuda:12.1.0-devel-ubuntu20.04
cudaversion: 121
torchversion: 212
arch: 60 # for P100 on Kaggle
- os: ubuntu-latest
cuda: nvidia/cuda:12.1.0-devel-ubuntu20.04
cudaversion: 121
Expand All @@ -183,11 +189,26 @@ jobs:
run: |
apt-get update
apt-get install -y git python3 python3-pip
- name: Install GitHub CLI
run: |
apt-get install -y curl
curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | tee /etc/apt/sources.list.d/github-cli.list > /dev/null
apt-get update
apt-get install -y gh
- name: Install Miniconda
run: |
curl -L https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -o miniconda.sh
bash miniconda.sh -b -p $HOME/miniconda
shell: bash

- name: Set up environment
run: |
echo "$HOME/miniconda/bin" >> $GITHUB_PATH
source $HOME/miniconda/etc/profile.d/conda.sh
conda create -n myenv python=3.10 -y
conda activate myenv
shell: bash

- uses: actions/checkout@v3
with:
Expand All @@ -200,14 +221,29 @@ jobs:
ls -R
- name: Install Wheel
run:
source $HOME/miniconda/etc/profile.d/conda.sh
conda activate myenv
python --version
pip install setuptools wheel
shell: bash

- name: Install Pytorch
run: |
pip3 install torch==2.1.2 --index-url https://download.pytorch.org/whl/cu121
source $HOME/miniconda/etc/profile.d/conda.sh
conda activate myenv
python --version
pip install torch==2.1.2 --index-url https://download.pytorch.org/whl/cu121
shell: bash

- name: Generate Wheels
run: |
source $HOME/miniconda/etc/profile.d/conda.sh
conda activate myenv
python --version
cd bindings/torch
python3 setup.py bdist_wheel --plat-name linux_x86_64
python setup.py bdist_wheel --plat-name linux_x86_64
shell: bash

env:
INCLUDE_ARCH: ${{ matrix.arch }}
- name: Upload assets
Expand Down

0 comments on commit 5054026

Please sign in to comment.