|
#@title 2. Install the requirements |
|
|
|
%cd /tmp |
|
!wget -c https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh |
|
%env PYTHONPATH= |
|
!which conda 2>/dev/null || bash Miniconda3-latest-Linux-x86_64.sh -b -p /usr/local -f |
|
%env CI=true |
|
!conda init -q bash |
|
!source /usr/local/bin/activate && conda update -y -q -c defaults --all |
|
!source /usr/local/bin/activate && conda create -y -q -n textgen |
|
!source /usr/local/bin/activate && conda activate textgen && conda install -y -q -c defaults conda python |
|
!source /usr/local/bin/activate && conda activate textgen && conda install -y -q -c pytorch -c nvidia pytorch torchvision torchaudio pytorch-cuda=11.7 |
|
!source /usr/local/bin/activate && conda clean -y -q --all |
|
|
|
# Download Github repo |
|
%cd /content |
|
!git clone https://github.com/oobabooga/text-generation-webui |
|
!ln -s text-generation-webui/models . |
|
!ln -s text-generation-webui/characters . |
|
!ln -s text-generation-webui/presets . |
|
%rm -r sample_data |
|
%cd text-generation-webui |
|
!wget https://oobabooga.github.io/settings-colab.json -O settings-colab-template.json |
|
|
|
# Install requirements |
|
!source /usr/local/bin/activate && conda activate textgen && pip install --no-cache-dir --progress-bar=off --root-user-action=ignore -r requirements.txt diffusers |
|
!source /usr/local/bin/activate && conda activate textgen && pip install --no-cache-dir --progress-bar=off --root-user-action=ignore -r extensions/google_translate/requirements.txt |