diff --git a/.github/workflows/pypi_publish.yml b/.github/workflows/pypi_publish.yml new file mode 100644 index 0000000..1a03a7b --- /dev/null +++ b/.github/workflows/pypi_publish.yml @@ -0,0 +1,31 @@ +# This workflow will upload a Python Package using Twine when a release is created +# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries + +name: Upload Python Package + +on: + release: + types: [created] + +jobs: + deploy: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: '3.x' + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install setuptools wheel twine + - name: Build and publish + env: + TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} + TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} + run: | + python setup.py sdist bdist_wheel + twine upload dist/* diff --git a/README.md b/README.md index 77cf8b1..028ae76 100644 --- a/README.md +++ b/README.md @@ -51,12 +51,22 @@ Key points about U-FISH: - [ ] Benchmarks - [ ] Documentation -## Usage +## Installation ```bash pip install ufish ``` +For inference using GPU: + +```bash +pip install ufish[onnxruntime-gpu] +``` + +For training using GPU, you need to install PyTorch with CUDA support, see [PyTorch official website](https://pytorch.org/) for details. + +## Usage + CLI usage: ```bash diff --git a/requirements.txt b/requirements.txt index 9213b1e..a0a8d68 100644 --- a/requirements.txt +++ b/requirements.txt @@ -12,6 +12,5 @@ tensorboard imagecodecs onnx onnxruntime -onnxruntime-gpu zarr ome-zarr diff --git a/setup.py b/setup.py index b9ecc3c..1d4796c 100644 --- a/setup.py +++ b/setup.py @@ -80,6 +80,7 @@ def get_doc_requires(): install_requires=get_install_requires(), extras_require={ 'dev': requires_dev, + 'onnxruntime-gpu': ['onnxruntime-gpu'], }, python_requires='>=3.9, <4', entry_points={