Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
AutoAWQ
Commits
5bc0916b
Commit
5bc0916b
authored
Aug 28, 2023
by
Casper
Browse files
Separate PyTorch install
parent
6aa94f54
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
37 additions
and
24 deletions
+37
-24
.github/workflows/build.yaml
.github/workflows/build.yaml
+37
-24
No files found.
.github/workflows/build.yaml
View file @
5bc0916b
...
@@ -3,8 +3,8 @@ name: Build
...
@@ -3,8 +3,8 @@ name: Build
# run jobs on new release starting with "v"
# run jobs on new release starting with "v"
on
:
on
:
push
:
push
:
tag
s
:
branche
s
:
-
v*
-
release_package
jobs
:
jobs
:
# create a github release
# create a github release
...
@@ -22,16 +22,16 @@ jobs:
...
@@ -22,16 +22,16 @@ jobs:
run
:
|
run
:
|
echo "release_tag=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
echo "release_tag=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
-
name
:
Create Release
#
- name: Create Release
id
:
create_release
#
id: create_release
uses
:
"
actions/github-script@v6"
#
uses: "actions/github-script@v6"
env
:
#
env:
RELEASE_TAG
:
${{ env.release_tag }}
#
RELEASE_TAG: ${{ env.release_tag }}
with
:
#
with:
github-token
:
"
${{
secrets.GITHUB_TOKEN
}}"
#
github-token: "${{ secrets.GITHUB_TOKEN }}"
script
:
|
#
script: |
const script = require('.github/workflows/scripts/github_create_release.js')
#
const script = require('.github/workflows/scripts/github_create_release.js')
await script(github, context, core)
#
await script(github, context, core)
# build AWQ
# build AWQ
build
:
build
:
...
@@ -42,21 +42,19 @@ jobs:
...
@@ -42,21 +42,19 @@ jobs:
matrix
:
matrix
:
os
:
[
ubuntu-20.04
]
os
:
[
ubuntu-20.04
]
python-version
:
[
"
3.8"
,
"
3.9"
,
"
3.10"
,
"
3.11"
]
python-version
:
[
"
3.8"
,
"
3.9"
,
"
3.10"
,
"
3.11"
]
cuda
:
[
"
11.8"
]
cuda
-version
:
[
"
11.8"
]
defaults
:
defaults
:
run
:
run
:
shell
:
pwsh
shell
:
pwsh
env
:
CUDA_VERSION
:
${{ matrix.cuda }}
steps
:
steps
:
-
name
:
Checkout code
-
name
:
Checkout code
uses
:
actions/checkout@v3
uses
:
actions/checkout@v3
-
name
:
Setup Python
-
name
:
Setup Python
uses
:
actions/setup-python@v
3
uses
:
actions/setup-python@v
4
with
:
with
:
python-version
:
${{ matrix.py
ver
}}
python-version
:
${{ matrix.py
thon-version
}}
-
name
:
Setup Miniconda
-
name
:
Setup Miniconda
uses
:
conda-incubator/setup-miniconda@v2.2.0
uses
:
conda-incubator/setup-miniconda@v2.2.0
...
@@ -70,19 +68,34 @@ jobs:
...
@@ -70,19 +68,34 @@ jobs:
add-pip-as-python-dependency
:
true
add-pip-as-python-dependency
:
true
auto-activate-base
:
false
auto-activate-base
:
false
-
name
:
Install Dependencies
-
name
:
Install CUDA
run
:
|
conda install cuda-toolkit -c "nvidia/label/cuda-${{ matrix.cuda-version }}.0"
$env:CUDA_PATH = $env:CONDA_PREFIX
$env:CUDA_HOME = $env:CONDA_PREFIX
echo "$env:CUDA_PATH"
echo "$env:CUDA_HOME"
-
name
:
Install PyTorch-cu${{ matrix.cuda-version }}
run
:
|
run
:
|
conda install cuda-toolkit -c "nvidia/label/cuda-${env:CUDA_VERSION}.0"
$env:TORCH_CUDA_ARCH_LIST = '8.0 8.6 8.9 9.0+PTX'
conda install pytorch "pytorch-cuda=${env:CUDA_VERSION}" -c pytorch -c nvidia
if ($IsLinux) { $env:LD_LIBRARY_PATH = $env:CONDA_PREFIX + '/lib:' + $env:LD_LIBRARY_PATH }
# Install torch
$env:CUDA_VERSION = ${{ matrix.cuda-version }} -replace '\.', ''
pip install --upgrade --no-cache-dir torch==2.0.1+cu$env:CUDA_VERSION --index-url https://download.pytorch.org/whl/cu$env:CUDA_VERSION
python -m pip install --upgrade build setuptools wheel ninja
python -m pip install --upgrade build setuptools wheel ninja
# Print version information
python --version
python -c "import torch; print('PyTorch:', torch.__version__)"
python -c "import torch; print('CUDA:', torch.version.cuda)"
python -c "from torch.utils import cpp_extension; print (cpp_extension.CUDA_HOME)"
-
name
:
Build Wheel
-
name
:
Build Wheel
run
:
|
run
:
|
$env:TORCH_CUDA_ARCH_LIST = '8.0 8.6 8.9 9.0+PTX'
$env:PYPI_RELEASE = "1"
$env:PYPI_RELEASE = "1"
$env:CUDA_PATH = $env:CONDA_PREFIX
$env:CUDA_HOME = $env:CONDA_PREFIX
if ($IsLinux) { $env:LD_LIBRARY_PATH = $env:CONDA_PREFIX + '/lib:' + $env:LD_LIBRARY_PATH }
python setup.py sdist bdist_wheel
python setup.py sdist bdist_wheel
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment