feat(api): add requirements file for each platform (#193)
This commit is contained in:
parent
f575cba7d3
commit
31054c4ee3
|
@ -167,7 +167,7 @@ package-api-twine:
|
||||||
cache:
|
cache:
|
||||||
key:
|
key:
|
||||||
files:
|
files:
|
||||||
- api/dev-requirements.txt
|
- api/requirements/dev.txt
|
||||||
paths:
|
paths:
|
||||||
- .cache/pip
|
- .cache/pip
|
||||||
policy: pull-push
|
policy: pull-push
|
||||||
|
|
19
README.md
19
README.md
|
@ -172,13 +172,26 @@ Update pip itself:
|
||||||
|
|
||||||
### Install pip packages
|
### Install pip packages
|
||||||
|
|
||||||
You can install of the necessary packages at once using [the `requirements.txt` file](./api/requirements.txt):
|
You can install all of the necessary packages at once using [the `requirements/base.txt` file](./api/requirements/base.txt)
|
||||||
|
and the `requirements/` file for your platform:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
> pip install -r requirements.txt
|
> pip install -r requirements/base.txt -r requirements/amd-linux.txt
|
||||||
|
# or
|
||||||
|
> pip install -r requirements/base.txt -r requirements/amd-windows.txt
|
||||||
|
# or
|
||||||
|
> pip install -r requirements/base.txt -r requirements/amd-windows-nightly.txt
|
||||||
|
# or
|
||||||
|
> pip install -r requirements/base.txt -r requirements/cpu.txt
|
||||||
|
# or
|
||||||
|
> pip install -r requirements/base.txt -r requirements/nvidia.txt
|
||||||
```
|
```
|
||||||
|
|
||||||
_Or_ you can install them manually using pip:
|
Only install one of the platform-specific requirements files, otherwise you may end up with the wrong version of
|
||||||
|
PyTorch or the ONNX runtime. The ONNX runtime nightly packages used by `amd-windows-nightly.txt` can be substantially
|
||||||
|
faster than the latest release, but may not always be stable.
|
||||||
|
|
||||||
|
If you prefer, you can install all of the packages manually using pip:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
> pip install "numpy>=1.20,<1.24"
|
> pip install "numpy>=1.20,<1.24"
|
||||||
|
|
|
@ -13,7 +13,7 @@ pip: check-venv
|
||||||
pip install -r requirements.txt
|
pip install -r requirements.txt
|
||||||
|
|
||||||
pip-dev: check-venv
|
pip-dev: check-venv
|
||||||
pip install -r dev-requirements.txt
|
pip install -r requirements/dev.txt
|
||||||
|
|
||||||
test:
|
test:
|
||||||
python -m coverage run -m unittest discover -s tests/
|
python -m coverage run -m unittest discover -s tests/
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
--index-url https://download.pytorch.org/whl/rocm5.2
|
||||||
|
torch
|
||||||
|
--index-url https://download.pytorch.org/whl/rocm5.2
|
||||||
|
torchvision
|
||||||
|
onnxruntime
|
|
@ -0,0 +1,6 @@
|
||||||
|
--index-url https://download.pytorch.org/whl/cpu
|
||||||
|
torch
|
||||||
|
--index-url https://download.pytorch.org/whl/cpu
|
||||||
|
torchvision
|
||||||
|
--index-url https://aiinfra.pkgs.visualstudio.com/PublicPackages/_packaging/ORT-Nightly/pypi/simple/
|
||||||
|
ort-nightly-directml
|
|
@ -0,0 +1,5 @@
|
||||||
|
--index-url https://download.pytorch.org/whl/cpu
|
||||||
|
torch
|
||||||
|
--index-url https://download.pytorch.org/whl/cpu
|
||||||
|
torchvision
|
||||||
|
onnxruntime-directml
|
|
@ -0,0 +1,26 @@
|
||||||
|
### Specific versions ###
|
||||||
|
numpy>=1.20,<1.24
|
||||||
|
protobuf<4,>=3.20.2
|
||||||
|
|
||||||
|
### AI packages ###
|
||||||
|
accelerate
|
||||||
|
diffusers
|
||||||
|
onnx
|
||||||
|
# onnxruntime has many platform-specific packages
|
||||||
|
safetensors
|
||||||
|
transformers
|
||||||
|
|
||||||
|
#### Upscaling and face correction
|
||||||
|
basicsr
|
||||||
|
codeformer-perceptor
|
||||||
|
facexlib
|
||||||
|
gfpgan
|
||||||
|
realesrgan
|
||||||
|
|
||||||
|
### Server packages ###
|
||||||
|
boto3
|
||||||
|
flask
|
||||||
|
flask-cors
|
||||||
|
jsonschema
|
||||||
|
pyyaml
|
||||||
|
setproctitle
|
|
@ -0,0 +1,4 @@
|
||||||
|
--index-url https://download.pytorch.org/whl/cpu
|
||||||
|
torch
|
||||||
|
--index-url https://download.pytorch.org/whl/cpu
|
||||||
|
torchvision
|
|
@ -0,0 +1,5 @@
|
||||||
|
--index-url https://download.pytorch.org/whl/cu117
|
||||||
|
torch
|
||||||
|
--index-url https://download.pytorch.org/whl/cu117
|
||||||
|
torchvision
|
||||||
|
onnxruntime-gpu
|
Loading…
Reference in New Issue