mirror of
https://github.com/wassname/Clover-Edition.git
synced 2026-09-09 11:13:26 +08:00
fixed install script, added torrent
This commit is contained in:
@@ -37,7 +37,7 @@ To play with GPU, you need an NVIDA GPU with >4 GB of memory (exact minimum requ
|
||||
|
||||
Windows Installer is hopefully coming someday. I'm not 100% sure how to do it. In the meantime you can manually install pretty easily:
|
||||
|
||||
Install python, pytorch (`torch`), and `transformers`. Windows users may need to add the location of pip and python to their `PATH` variable manually (look up how to do that, it's not that hard.) Instructions to install pytorch can be found [here](https://pytorch.org/get-started/locally/). You do not need to install the package "torchvision". On Windows, with CUDA 10 and python 3, the command should look like this:
|
||||
Install python, pytorch (`torch`), and `transformers`. Windows users may need to add the location of pip and python to their `PATH` variable manually (look up how to do that, it's not that hard.) Instructions to install pytorch can be found [here](https://pytorch.org/get-started/locally/). You do not need to install the package "torchvision". On Windows, with CUDA 10 and python 3, the command should look like the following. Older versions of CUDA or CPU only are also possible with a different download, see the pytorch install link.
|
||||
|
||||
```
|
||||
pip3 install torch -f https://download.pytorch.org/whl/torch_stable.html
|
||||
@@ -55,10 +55,14 @@ Then to install just download this repo. Github has a download option somewhere.
|
||||
|
||||
Then you will need to download the model. Put it in the models folder. Rename it to `pytorch-gpt2-xl-aid2-v5` until we support arbitrary model names. The current torrent file and magnet links are here, please seed them if you have a seedbox or homelab:
|
||||
|
||||
[Torrent File](https://github.com/AccidentallyOnPurpose/pytorch-AIDungeon/blob/f692e39d84/generator/gpt2/models/model_v5_pytorch.torrent?raw=true)
|
||||
[Torrent File](model.torrent)
|
||||
|
||||
[Magnet Link](magnet:?xt=urn:btih:17dcfe3d12849db04a3f64070489e6ff5fc6f63f&dn=model_v5_pytorch&tr=udp%3a%2f%2ftracker.opentrackr.org%3a1337%2fannounce&tr=udp%3a%2f%2fopen.stealth.si%3a80%2fannounce&tr=udp%3a%2f%2fp4p.arenabg.com%3a1337%2fannounce&tr=udp%3a%2f%2ftracker.coppersurfer.tk%3a6969%2fannounce&tr=udp%3a%2f%2ftracker.cyberia.is%3a6969%2fannounce&tr=udp%3a%2f%2ftracker.moeking.me%3a6969%2fannounce&tr=udp%3a%2f%2f9.rarbg.me%3a2710%2fannounce&tr=udp%3a%2f%2ftracker3.itzmx.com%3a6961%2fannounce)
|
||||
|
||||
```
|
||||
magnet:?xt=urn:btih:17dcfe3d12849db04a3f64070489e6ff5fc6f63f&dn=model_v5_pytorch&tr=udp%3a%2f%2ftracker.opentrackr.org%3a1337%2fannounce&tr=udp%3a%2f%2fopen.stealth.si%3a80%2fannounce&tr=udp%3a%2f%2fp4p.arenabg.com%3a1337%2fannounce&tr=udp%3a%2f%2ftracker.coppersurfer.tk%3a6969%2fannounce&tr=udp%3a%2f%2ftracker.cyberia.is%3a6969%2fannounce&tr=udp%3a%2f%2ftracker.moeking.me%3a6969%2fannounce&tr=udp%3a%2f%2f9.rarbg.me%3a2710%2fannounce&tr=udp%3a%2f%2ftracker3.itzmx.com%3a6961%2fannounce
|
||||
```
|
||||
|
||||
Once downloaded your model folder should look like this:
|
||||
```
|
||||
./models
|
||||
|
||||
+2
-2
@@ -8,8 +8,8 @@ MODELS_DIRECTORY=models
|
||||
MODEL_VERSION=pytorch-gpt2-xl-aid2-v5
|
||||
MODEL_DIRECTORY="${MODELS_DIRECTORY}"
|
||||
|
||||
MODEL_TORRENT_URL="https://raw.githubusercontent.com/AccidentallyOnPurpose/pytorch-AIDungeon/f692e39d84b21d39da9819142165a05a03030892/generator/gpt2/models/model_v5_pytorch.torrent"
|
||||
MODEL_TORRENT_BASENAME="$(basename "${MODEL_TORRENT_URL}")"
|
||||
MODEL_TORRENT_URL="https://raw.githubusercontent.com/cloveranon/Clover-Edition/master/model.torrent"
|
||||
MODEL_TORRENT_BASENAME=model_v5_pytorch #"$(basename "${MODEL_TORRENT_URL}")"
|
||||
|
||||
download_torrent() {
|
||||
echo "Creating directories."
|
||||
|
||||
+17
-21
@@ -3,27 +3,23 @@ set -e
|
||||
cd "$(dirname "${0}")"
|
||||
BASE_DIR="$(pwd)"
|
||||
PACKAGES=(aria2 git unzip wget)
|
||||
# Tensorflow states 3.4.0 as the minimum version.
|
||||
# This is also the minimum version with venv support.
|
||||
# 3.8.0 and up only includes tensorflow 2.0 and not 1.15
|
||||
MIN_PYTHON_VERS="3.4.0"
|
||||
MAX_PYTHON_VERS="3.7.9"
|
||||
#MIN_PYTHON_VERS="3.4.0"
|
||||
|
||||
version_check () {
|
||||
MAX_VERS=$(echo -e "$(python3 --version | cut -d' ' -f2)\n$MAX_PYTHON_VERS\n$MIN_PYTHON_VERS"\
|
||||
| sort -V | tail -n1)
|
||||
MIN_VERS=$(echo -e "$(python3 --version | cut -d' ' -f2)\n$MAX_PYTHON_VERS\n$MIN_PYTHON_VERS"\
|
||||
| sort -V | head -n1)
|
||||
if [ "$MIN_VERS" != "$MIN_PYTHON_VERS" ]; then
|
||||
echo "Your installed python version, $(python3 --version), is too old."
|
||||
echo "Please update to at least $MIN_PYTHON_VERS."
|
||||
exit 1
|
||||
elif [ "$MAX_VERS" != "$MAX_PYTHON_VERS" ]; then
|
||||
echo "Your installed python version, $(python3 --version), is too new."
|
||||
echo "Please install $MAX_PYTHON_VERS."
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
#version_check () {
|
||||
# MAX_VERS=$(echo -e "$(python3 --version | cut -d' ' -f2)\n$MAX_PYTHON_VERS\n$MIN_PYTHON_VERS"\
|
||||
# | sort -V | tail -n1)
|
||||
# MIN_VERS=$(echo -e "$(python3 --version | cut -d' ' -f2)\n$MAX_PYTHON_VERS\n$MIN_PYTHON_VERS"\
|
||||
# | sort -V | head -n1)
|
||||
# if [ "$MIN_VERS" != "$MIN_PYTHON_VERS" ]; then
|
||||
# echo "Your installed python version, $(python3 --version), is too old."
|
||||
# echo "Please update to at least $MIN_PYTHON_VERS."
|
||||
# exit 1
|
||||
# elif [ "$MAX_VERS" != "$MAX_PYTHON_VERS" ]; then
|
||||
# echo "Your installed python version, $(python3 --version), is too new."
|
||||
# echo "Please install $MAX_PYTHON_VERS."
|
||||
# exit 1
|
||||
# fi
|
||||
#}
|
||||
|
||||
pip_install () {
|
||||
if [ ! -d "./venv" ]; then
|
||||
@@ -64,7 +60,7 @@ system_package_install() {
|
||||
}
|
||||
|
||||
install_aid () {
|
||||
version_check
|
||||
# version_check
|
||||
pip_install
|
||||
system_package_install
|
||||
}
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user