Skip to content

Commit

Permalink
Merge pull request #21 from rom1504/packaging
Browse files Browse the repository at this point in the history
Add github action to automatically push to pypi on Release x.y.z commit
  • Loading branch information
crowsonkb authored Nov 20, 2022
2 parents 987f898 + eb6a76f commit 62d46e8
Show file tree
Hide file tree
Showing 7 changed files with 47 additions and 9 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Release

on:
push:
branches:
- master
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-ecosystem/action-regex-match@v2
id: regex-match
with:
text: ${{ github.event.head_commit.message }}
regex: '^Release ([^ ]+)'
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.8'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
- name: Release
if: ${{ steps.regex-match.outputs.match != '' }}
uses: softprops/action-gh-release@v1
with:
tag_name: v${{ steps.regex-match.outputs.group1 }}
- name: Build and publish
if: ${{ steps.regex-match.outputs.match != '' }}
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
python setup.py sdist bdist_wheel
twine upload dist/*
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ __pycache__
out*
*.egg-info
*.ini
.env
3 changes: 0 additions & 3 deletions .gitmodules

This file was deleted.

1 change: 0 additions & 1 deletion CLIP
Submodule CLIP deleted from 40f548
8 changes: 3 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,11 @@ The models are denoising diffusion probabilistic models (https://arxiv.org/abs/2

Thank you to [stability.ai](https://www.stability.ai) for compute to train these models!

## Dependencies
## Installation

- PyTorch ([installation instructions](https://pytorch.org/get-started/locally/))
`pip install v-diffusion-pytorch`

- requests, tqdm (install with `pip install`)

- CLIP (https://github.com/openai/CLIP), and its additional pip-installable dependencies: ftfy, regex. **If you `git clone --recursive` this repo, it should fetch CLIP automatically.**
or git clone then `pip install -e .`

## Model checkpoints:

Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ Pillow
torch
torchvision
tqdm
clip-anytorch
5 changes: 5 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
from setuptools import setup


if __name__ == '__main__':
setup()

0 comments on commit 62d46e8

Please sign in to comment.