Random stuff accumulated here. Also has python env setup.
https://repo.anaconda.com/archive/Anaconda3-2023.07-1-Linux-x86_64.sh
https://huggingface.co/docs/diffusers/using-diffusers/weighted_prompts
https://github.com/facebookresearch/segment-anything.git
https://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html#ubuntu
lspci | grep -i nvidia
uname -m && cat /etc/*release
gcc --version
uname -r
sudo apt-key del 7fa2af80
DISTRO='ubuntu2204'
ARCH='x86_64'
wget "https://developer.download.nvidia.com/compute/cuda/repos/${DISTRO}/${ARCH}/cuda-keyring_1.1-1_all.deb"
sudo dpkg -i 'cuda-keyring_1.1-1_all.deb'
DISTRO='ubuntu2204'
ARCH='x86_64'
echo "deb [signed-by=/usr/share/keyrings/cuda-archive-keyring.gpg] https://developer.download.nvidia.com/compute/cuda/repos/${DISTRO}/${ARCH}/ /" > "/etc/apt/sources.list.d/cuda-${DISTRO}-${ARCH}.list"
DISTRO='ubuntu2204'
ARCH='x86_64'
wget "https://developer.download.nvidia.com/compute/cuda/repos/${DISTRO}/${ARCH}/cuda-${DISTRO}.pin"
sudo mv "cuda-${DISTRO}.pin" '/etc/apt/preferences.d/cuda-repository-pin-600'
sudo apt-get update
sudo apt-get install cuda
sudo apt-get install cuda-toolkit
sudo apt-get 'install' \
'aria2' \
'build-essential' \
'cpio' \
'cuda-toolkit-11-7' \
'fish' \
'fizsh' \
'git-lfs' \
'squashfs-tools' \
'zstd' \
;
aria2c -c -j16 -x16 'https://repo.anaconda.com/archive/Anaconda3-2023.07-1-Linux-x86_64.sh'
. /opt/anaconda/bin/activate
conda activate myenv
export PATH="/usr/local/cuda-11.7/bin/:${PATH}"
export LD_LIBRARY_PATH="/usr/local/cuda-11.7/lib64:${LD_LIBRARY_PATH}"
exec fizsh
SRC_DIR="$(dirname -- "$(realpath -- "${0}")")"
cd "${SRC_DIR}"
pwd
. /opt/anaconda/bin/activate
conda create -n myenv
conda activate myenv
conda install \
'cython' \
'ipython' \
'jinja2' \
'jupyter' \
'jupyterlab' \
'matplotlib' \
'nbconvert' \
'numpy' \
'pandas' \
'pillow' \
'pyqt' \
'python' \
'requests' \
'scikit-image' \
'scikit-learn' \
'scikit-learn-intelex' \
'scipy' \
'tqdm' \
;
conda install -c conda-forge \
'gradio' \
'ninja' \
'opencv' \
'protobuf' \
'pudb' \
'setuptools' \
'streamlit' \
'termcolor' \
;
get_repo(){
URL="${1}"
D1="$(basename -- "$(dirname -- "${URL}")")"
D2="$(basename -- "${URL}" | sed 's@\.git$@@g')"
DIR_PREFIX="${HOME}/GITHUB/${D1}/"
DIR_FINAL="${DIR_PREFIX}/${D2}"
mkdir -pv -- "${DIR_PREFIX}"
cd "${DIR_PREFIX}"
git clone "${URL}"
cd "${DIR_FINAL}"
git pull
}
get_repo 'https://github.com/huggingface/diffusers.git'
pip install -e .
get_repo 'https://github.com/pharmapsychotic/clip-interrogator.git'
pip install -e .
get_repo 'https://github.com/patrickvonplaten/controlnet_aux.git'
pip install -e .
get_repo 'https://github.com/facebookresearch/segment-anything.git'
pip install -e .
get_repo 'https://github.com/SysCV/sam-hq.git'
pip install -e .
get_repo 'https://github.com/IDEA-Research/GroundingDINO.git'
pip install -e .
get_repo 'https://github.com/GoGoDuck912/Self-Correction-Human-Parsing.git'
get_repo 'https://github.com/IDEA-Research/Grounded-Segment-Anything.git'
git submodule update --init --recursive
cd ./segment_anything
pip install -e .
get_repo 'https://github.com/Hzzone/pytorch-openpose.git'
pip install \
'accelerate>=0.16.0' \
'addict' \
'datasets' \
'fairscale' \
'ftfy' \
'gdown' \
'huggingface_hub' \
'mediapipe' \
'nltk' \
'onnxruntime' \
'pycocotools' \
'PyYAML' \
'supervision' \
'tensorboard' \
'timm' \
'torch' \
'torchvision' \
'transformers>=4.25.1' \
'xformers' \
'yapf' \
;