Skip to content

Commit

Permalink
build: switched to CPU-only PyTorch
Browse files Browse the repository at this point in the history
gains:
- distributable size reduction
- minor speed bump when running from AppImage
  • Loading branch information
yurijmikhalevich committed Aug 7, 2021
1 parent b27d31d commit 58b71c0
Show file tree
Hide file tree
Showing 6 changed files with 70 additions and 90 deletions.
1 change: 1 addition & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
PIP_FIND_LINKS="https://download.pytorch.org/whl/torch_stable.html"
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,6 @@ celerybeat.pid
*.sage.py

# Environments
.env
.venv
env/
venv/
Expand Down
2 changes: 2 additions & 0 deletions Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ name = "pypi"

[packages]
clip = {git = "https://github.com/openai/CLIP.git"}
torch = "==1.9.0+cpu"
torchvision = "==0.10.0+cpu"

[dev-packages]
pycodestyle = "~=2.7"
Expand Down
143 changes: 58 additions & 85 deletions Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 8 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,13 @@

Currently, pre-built distributable is available only for Linux x86_64.

1. Download the AppImage from the latest [release](https://github.com/yurijmikhalevich/rclip/releases).

2. Execute following commands:

```bash
$ wget -c https://github.com/yurijmikhalevich/rclip/releases/download/v0.0.1-alpha/rclip-0.0.1-alpha-x86_64.AppImage
$ chmod +x rclip-0.0.1-alpha-x86_64.AppImage
$ sudo mv rclip-0.0.1-alpha-x86_64.AppImage /usr/local/bin/rclip
$ chmod +x <downloaded AppImage filename>
$ sudo mv <downloaded AppImage filename> /usr/local/bin/rclip
```

## Usage
Expand All @@ -40,6 +43,8 @@ $ rclip --help

This repository follows the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) standard.

Please, execute `pipenv shell` before running `pipenv sync` or `pipenv install` to set `PIP_FIND_LINKS`.

## License

MIT
2 changes: 1 addition & 1 deletion appimage_after_bundle.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ LD_LIBRARY_PATH=$APPDIR/usr/lib/x86_64-linux-gnu
python3.8 -m pip install pipenv &&
python3.8 -m pipenv lock -r > requirements.txt &&
python3.8 -m pip install --upgrade --isolated --no-input --ignore-installed --prefix="$APPDIR/usr" certifi wheel &&
python3.8 -m pip install --upgrade --isolated --no-input --ignore-installed --prefix="$APPDIR/usr" -r ./requirements.txt
python3.8 -m pip install --upgrade --isolated --no-input --ignore-installed --prefix="$APPDIR/usr" -r ./requirements.txt -f https://download.pytorch.org/whl/torch_stable.html

0 comments on commit 58b71c0

Please sign in to comment.