-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3cd7edd
commit ffb871e
Showing
6 changed files
with
109 additions
and
146 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,43 @@ | ||
$schema: https://json-schema.org/draft/2020-12/schema | ||
$id: https://github.com/instructions-d-installation/installation-instruction/examples/pytorch/schema_pytorch.yml | ||
$id: https://github.com/instructions-d-installation/installation-instruction/examples/pytorch/instruction_pytorch.schema.yml | ||
title: PyTorch Install Schema | ||
description: This is a schema which is used for constructing interactive installation instructions. | ||
type: object | ||
$comment: by Adam McKellar | ||
properties: | ||
build: | ||
enum: | ||
- Stable (2.3.0) | ||
- Preview (Nightly) | ||
anyOf: | ||
- title: Stable (2.3.0) | ||
const: stable | ||
- title: Preview (Nightly) | ||
const: preview | ||
os: | ||
enum: | ||
- Linux | ||
- Mac | ||
- Windows | ||
anyOf: | ||
- title: Linux | ||
const: linux | ||
- title: Mac | ||
const: mac | ||
- title: Windows | ||
const: win | ||
package: | ||
enum: | ||
- Conda | ||
- Pip | ||
- LibTorch | ||
- Source | ||
language: | ||
enum: | ||
- Python | ||
- C++/Java | ||
anyOf: | ||
- title: Conda | ||
const: conda | ||
- title: Pip | ||
const: pip | ||
computer_platform: | ||
enum: | ||
- CUDA 11.8 | ||
- CUDA 12.1 | ||
- ROCm 6.0 | ||
- CPU | ||
anyOf: | ||
- title: CUDA 11.8 | ||
const: cu118 | ||
- title: CUDA 12.1 | ||
const: cu121 | ||
- title: ROCm 6.0 | ||
const: ro60 | ||
- title: CPU | ||
const: cpu | ||
required: | ||
- build | ||
- os | ||
- package | ||
- language | ||
- computer_platform | ||
additionalProperties: false |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
{# Adams spaghetti code #} | ||
{% if package == "conda" %} | ||
conda install | ||
|
||
{% if os == "mac" %} | ||
{% if computer_platform == "cpu" %} | ||
pytorch::pytorch torchvision torchaudio | ||
{% else %} | ||
[[ERROR]] | ||
Mac does not support ROCm or CUDA! | ||
[[ERROR]] | ||
{% endif %} | ||
{% else %} | ||
pytorch torchvision torchaudio | ||
|
||
{% if computer_platform == "cu118" %} | ||
pytorch-cuda=11.8 -c nvidia | ||
{% elif computer_platform == "cu121" %} | ||
pytorch-cuda=12.1 -c nvidia | ||
{% elif computer_platform == "ro60" %} | ||
[[ERROR]] | ||
ROCm is currently not supported with conda on linux and not supported at all on windows! | ||
[[ERROR]] | ||
{% else %} | ||
cpuonly | ||
{% endif %} | ||
{% endif %} | ||
|
||
-c pytorch | ||
|
||
{% elif package == "pip" %} | ||
pip3 install torch torchvision torchaudio | ||
|
||
{% if os == "mac" %} | ||
{% if computer_platform != "cpu" %} | ||
[[ERROR]] | ||
Mac does not support ROCm or CUDA! | ||
[[ERROR]] | ||
{% endif %} | ||
{% else %} | ||
{% if computer_platform == "cu118" %} | ||
--index-url https://download.pytorch.org/whl/cu118 | ||
{% elif computer_platform == "cu121" %} | ||
{% if os == "win" %} | ||
--index-url https://download.pytorch.org/whl/cu121 | ||
{% endif %} | ||
{% elif computer_platform == "ro60" %} | ||
{% if os == "linux" %} | ||
--index-url https://download.pytorch.org/whl/rocm6.0 | ||
{% else %} | ||
[[ERROR]] | ||
Windows does not support ROCm! | ||
[[ERROR]] | ||
{% endif %} | ||
{% else %} | ||
{% if os == "linux" %} | ||
--index-url https://download.pytorch.org/whl/cpu | ||
{% endif %} | ||
{% endif %} | ||
{% endif %} | ||
{% endif %} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
build: Stable (2.3.0) | ||
os: Linux | ||
package: Conda | ||
language: Python | ||
computer_platform: CPU | ||
build: stable | ||
os: linux | ||
package: conda | ||
computer_platform: cpu |
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