Last active
October 19, 2023 20:34
-
-
Save arno01/8c4a1e5f4a272b0491500c58b6fa7a20 to your computer and use it in GitHub Desktop.
This file contains 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
--- | |
version: "2.0" | |
services: | |
app: | |
image: ubuntu:22.04 | |
env: | |
# Optional: set your ssh key if you want to ssh into this deployment; otherwise remove this line. | |
- 'SSH_PUBKEY=ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINNFxqDbY0BlEjJ2y9B2IKUUoimOq6oAC7WcsQT8qmII' | |
command: | |
- "sh" | |
- "-c" | |
args: | |
- 'apt-get update; | |
apt-get install -y --no-install-recommends -- ssh wget ca-certificates google-perftools wget git python3 python3-venv libgl1 libglib2.0-0 aria2; | |
useradd -s /bin/bash -m user; | |
set -ex; | |
su - user -c "wget https://raw.githubusercontent.com/AUTOMATIC1111/stable-diffusion-webui/v1.6.0/webui.sh; | |
bash webui.sh --help >/dev/null; | |
aria2c --max-tries=15 --retry-wait=10 -s10 -x10 -j10 https://download.pytorch.org/whl/cu118/torch-2.0.1%2Bcu118-cp310-cp310-linux_x86_64.whl; | |
~/stable-diffusion-webui/venv/bin/pip3 install ./torch-2.0.1+cu118-cp310-cp310-linux_x86_64.whl; | |
rm -vf ~/torch-2.0.1+cu118-cp310-cp310-linux_x86_64.whl; | |
aria2c --max-tries=15 --retry-wait=10 -s10 -x10 -j10 -o stable-diffusion-webui/models/Stable-diffusion/v1-5-pruned-emaonly.safetensors https://huggingface.co/runwayml/stable-diffusion-v1-5/resolve/main/v1-5-pruned-emaonly.safetensors; | |
aria2c --max-tries=15 --retry-wait=10 -s10 -x10 -j10 -o stable-diffusion-webui/models/Stable-diffusion/edgeOfRealism_eorV20Fp16BakedVAE.safetensors https://civitai.com/api/download/models/51913;"; | |
mkdir -p -m0755 /run/sshd; | |
mkdir -m700 /root/.ssh; | |
echo "$SSH_PUBKEY" | tee /root/.ssh/authorized_keys; | |
chmod 0600 /root/.ssh/authorized_keys; | |
su - user -c "bash webui.sh --listen --port=8080 --no-download-sd-model --theme=dark" & | |
exec /usr/sbin/sshd -D' | |
expose: | |
- port: 8080 | |
as: 80 | |
to: | |
- global: true | |
- port: 22 | |
as: 22 | |
to: | |
- global: true | |
profiles: | |
compute: | |
app: | |
resources: | |
cpu: | |
units: 4 | |
memory: | |
size: 16Gi | |
storage: | |
size: 50Gi | |
gpu: | |
units: 1 | |
attributes: | |
vendor: | |
nvidia: | |
#- model: t4 | |
#- model: a4000 | |
#- model: a100 | |
#- model: v100 | |
placement: | |
akash: | |
attributes: | |
host: akash | |
pricing: | |
app: | |
denom: uakt | |
amount: 1000000 | |
deployment: | |
app: | |
akash: | |
profile: app | |
count: 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment