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
3fa74007
Unverified
Commit
3fa74007
authored
Oct 01, 2023
by
Casper
Committed by
GitHub
Oct 01, 2023
Browse files
Merge pull request #84 from casper-hansen/fix_ghwf
Faster build, fix "no space left".
parents
20cd7981
8f05eaef
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
14 deletions
+32
-14
.github/workflows/build.yaml
.github/workflows/build.yaml
+32
-14
No files found.
.github/workflows/build.yaml
View file @
3fa74007
...
@@ -47,45 +47,63 @@ jobs:
...
@@ -47,45 +47,63 @@ jobs:
shell
:
pwsh
shell
:
pwsh
env
:
env
:
CUDA_VERSION
:
${{ matrix.cuda }}
CUDA_VERSION
:
${{ matrix.cuda }}
steps
:
steps
:
-
name
:
Free Disk Space
uses
:
jlumbroso/free-disk-space@v1.3.0
if
:
runner.os == 'Linux'
with
:
tool-cache
:
false
android
:
true
dotnet
:
true
haskell
:
true
large-packages
:
false
docker-images
:
true
swap-storage
:
false
-
uses
:
actions/checkout@v3
-
uses
:
actions/checkout@v3
-
uses
:
actions/setup-python@v3
-
uses
:
actions/setup-python@v3
with
:
with
:
python-version
:
${{ matrix.pyver }}
python-version
:
${{ matrix.pyver }}
-
name
:
Setup M
inicond
a
-
name
:
Setup M
amb
a
uses
:
conda-incubator/setup-miniconda@v2.2.0
uses
:
conda-incubator/setup-miniconda@v2.2.0
with
:
with
:
activate-environment
:
"
build"
activate-environment
:
"
build"
python-version
:
${{ matrix.pyver }}
python-version
:
${{ matrix.pyver }}
mamba-version
:
"
*"
miniforge-variant
:
Mambaforge
use-mamba
:
false
miniforge-version
:
latest
channels
:
conda-forge,defaults
use-mamba
:
true
channel-priority
:
true
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 Dependencies
run
:
|
run
:
|
conda install cuda-toolkit -c "nvidia/label/cuda-${env:CUDA_VERSION}.0"
# Install CUDA toolkit
conda install pytorch "pytorch-cuda=${env:CUDA_VERSION}" -c pytorch -c nvidia
mamba install -y 'cuda' -c "nvidia/label/cuda-${env:CUDA_VERSION}.0"
python -m pip install --upgrade build setuptools wheel ninja
# Environment variables
# Env variables
Add-Content $env:GITHUB_ENV "CUDA_PATH=$env:CONDA_PREFIX"
$env:CUDA_PATH = $env:CONDA_PREFIX
Add-Content $env:GITHUB_ENV "CUDA_HOME=$env:CONDA_PREFIX"
$env:CUDA_HOME = $env:CONDA_PREFIX
if ($IsLinux) {$env:LD_LIBRARY_PATH = $env:CONDA_PREFIX + '/lib:' + $env:LD_LIBRARY_PATH}
# Install torch
$cudaVersionPytorch = $env:CUDA_VERSION.Replace('.', '')
python -m pip install --upgrade --no-cache-dir torch==2.0.1+cu$cudaVersionPytorch --index-url https://download.pytorch.org/whl/cu$cudaVersionPytorch
python -m pip install build setuptools wheel ninja
# Print version information
# Print version information
python --version
python --version
python -c "import torch; print('PyTorch:', torch.__version__)"
python -c "import torch; print('PyTorch:', torch.__version__)"
python -c "import torch; print('CUDA:', torch.version.cuda)"
python -c "import torch; print('CUDA:', torch.version.cuda)"
python -c "import os; print('CUDA_HOME:', os.getenv('CUDA_HOME', None))"
python -c "from torch.utils import cpp_extension; print (cpp_extension.CUDA_HOME)"
python -c "from torch.utils import cpp_extension; print (cpp_extension.CUDA_HOME)"
-
name
:
Build Wheel
-
name
:
Build Wheel
run
:
|
run
:
|
$env:CUDA_PATH = $env:CONDA_PREFIX
$env:CUDA_HOME = $env:CONDA_PREFIX
python setup.py sdist bdist_wheel
python setup.py sdist bdist_wheel
-
name
:
Upload Assets
-
name
:
Upload Assets
...
...
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