Created
June 19, 2022 07:16
-
-
Save manatails/826971bb112c59fa50e5cbf012402295 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| set -e | |
| # Dall-e mini/mega Easy Install Script by manatails | |
| # Install prerequisites | |
| sudo apt update && sudo apt install -y apt-transport-https ca-certificates curl software-properties-common git | |
| # Install Docker | |
| curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - | |
| sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu focal stable" | |
| sudo apt update && sudo apt install -y docker-ce | |
| #Install nvidia container toolkit which is needed to passthrough the GPU to docker containers | |
| distribution=$(. /etc/os-release;echo $ID$VERSION_ID) | |
| curl -s -L https://nvidia.github.io/nvidia-docker/gpgkey | sudo apt-key add - | |
| curl -s -L https://nvidia.github.io/nvidia-docker/$distribution/nvidia-docker.list | sudo tee /etc/apt/sources.list.d/nvidia-docker.list | |
| sudo apt update && sudo apt install -y nvidia-container-toolkit | |
| # Restart docker services | |
| sudo systemctl restart docker | |
| # Download Dall-e source | |
| git clone https://github.com/borisdayma/dalle-mini | |
| cd dalle-mini | |
| # I used this commit at the time of writing but feel free to remove this line as you prefer | |
| git checkout 7540deaefa0e30cf304d5b21636566f333d8818a | |
| cd Docker | |
| # It seems that there are some changes on the jax repo so I had to edit the command to make it work. | |
| sed -i 's/jax_releases.html/jax_cuda_releases.html/g' Dockerfile | |
| sh build_docker.sh | |
| cd .. | |
| sh run_docker_image.sh | |
| # Installation is now finished. You can run the commands below to access the notebook. | |
| # cd tools/inference | |
| # ./run_infer_notebook.sh |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment