Skip to content

Instantly share code, notes, and snippets.

@tildebyte
Last active May 6, 2023 01:33
Show Gist options
  • Save tildebyte/8cbcb16bb081884103259bbac0585392 to your computer and use it in GitHub Desktop.
Save tildebyte/8cbcb16bb081884103259bbac0585392 to your computer and use it in GitHub Desktop.
Running inference against DeepFloyd's IF on RunPod
Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
#!/usr/bin/env sh
# Run this script against a running instance of runpod/pytorch:3.10-2.0.0-117 to
# get CUDA 11.8 and update torch 2 for running inference with DeepFloyd's IF model
# (via https://github.com/0x7o/IF-replicate which did the work of lining up the
# dependencies etc.)
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/cuda-ubuntu2004.pin
wget https://developer.download.nvidia.com/compute/cuda/11.8.0/local_installers/cuda-repo-ubuntu2004-11-8-local_11.8.0-520.61.05-1_amd64.deb
mv cuda-ubuntu2004.pin /etc/apt/preferences.d/cuda-repository-pin-600
dpkg -i cuda-repo-ubuntu2004-11-8-local_11.8.0-520.61.05-1_amd64.deb
cp /var/cuda-repo-ubuntu2004-11-8-local/cuda-*-keyring.gpg /usr/share/keyrings/
apt update
apt -y upgrade
apt -y install cuda less vim
python3 -m pip install --upgrade pip
python3 -m pip install --extra-index-url https://download.pytorch.org/whl/cu118 \
git+https://github.com/0x7o/IF.git \
git+https://github.com/openai/CLIP.git \
cog \
huggingface_hub==0.14.1 \
Pillow==9.5.0 \
protobuf==3.20.1 \
safetensors==0.3.0 \
scikit-image \
sentencepiece==0.1.98 \
tokenizers==0.13.3 \
torch==2.0+cu118 \
torchvision==0.15.1+cu118 \
tqdm==4.65.0 \
xformers==0.0.19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment