Difference between revisions of "Porting/PyTorch"

From RCS Wiki
Jump to navigation Jump to search
(→‎Binaries: Fix "git clone" typo)
(→‎Binaries: Add Debian workflow)
Line 1: Line 1:
 
= Binaries =
 
= Binaries =
 +
 +
== Debian ==
 +
 +
PyTorch is packaged in Debian Bookworm and works fine. Example workflow to install PyTorch and [https://github.com/xinntao/Real-ESRGAN Real-ESRGAN] on Debian Bookworm ppc64le:
 +
 +
sudo apt install python3-torch python3-torchvision python3-opencv python3-llvmlite python3-grpcio python3-pip python3-skimage python3-numba
 +
GRPC_PYTHON_BUILD_SYSTEM_OPENSSL=true pip3 install --user --break-system-packages basicsr facexlib gfpgan
 +
# Log in and log out again to update $PATH to include ~/.local/bin
 +
git clone https://github.com/xinntao/Real-ESRGAN.git
 +
cd Real-ESRGAN
 +
pip3 install --user --break-system-packages -r requirements.txt
 +
pip3 install --user --break-system-packages .
 +
# Real-ESRGAN is now installed.
 +
 +
== Conda ==
  
 
[https://github.com/open-ce/open-ce/ Open Cognitive Environment (Open-CE)] provides distro-independent ppc64le binaries of PyTorch and related packages. Example workflow to install PyTorch and [https://github.com/xinntao/Real-ESRGAN Real-ESRGAN] on Fedora 38 ppc64le:
 
[https://github.com/open-ce/open-ce/ Open Cognitive Environment (Open-CE)] provides distro-independent ppc64le binaries of PyTorch and related packages. Example workflow to install PyTorch and [https://github.com/xinntao/Real-ESRGAN Real-ESRGAN] on Fedora 38 ppc64le:

Revision as of 23:41, 19 May 2023

Binaries

Debian

PyTorch is packaged in Debian Bookworm and works fine. Example workflow to install PyTorch and Real-ESRGAN on Debian Bookworm ppc64le:

sudo apt install python3-torch python3-torchvision python3-opencv python3-llvmlite python3-grpcio python3-pip python3-skimage python3-numba
GRPC_PYTHON_BUILD_SYSTEM_OPENSSL=true pip3 install --user --break-system-packages basicsr facexlib gfpgan
# Log in and log out again to update $PATH to include ~/.local/bin 
git clone https://github.com/xinntao/Real-ESRGAN.git
cd Real-ESRGAN
pip3 install --user --break-system-packages -r requirements.txt
pip3 install --user --break-system-packages .
# Real-ESRGAN is now installed.

Conda

Open Cognitive Environment (Open-CE) provides distro-independent ppc64le binaries of PyTorch and related packages. Example workflow to install PyTorch and Real-ESRGAN on Fedora 38 ppc64le:

sudo dnf install python3.10
sudo dnf install conda
conda create --name pytorch python=3.10
# Close and re-open terminal
conda activate pytorch
conda install -c https://ftp.osuosl.org/pub/open-ce/current/ pytorch-cpu torchvision-cpu py-opencv
conda install -c numba llvmlite
conda install -c conda-forge grpcio
conda install -c conda-forge libstdcxx-ng
conda install pip
GRPC_PYTHON_BUILD_SYSTEM_OPENSSL=true pip install basicsr facexlib gfpgan
git clone https://github.com/xinntao/Real-ESRGAN.git
cd Real-ESRGAN
pip install -r requirements.txt
python setup.py develop
# Real-ESRGAN is now installed.

In progress