Skip to content

Commit

Permalink
Fix provisioning
Browse files Browse the repository at this point in the history
  • Loading branch information
robballantyne committed Jun 16, 2024
1 parent 046af83 commit 8074986
Show file tree
Hide file tree
Showing 17 changed files with 3 additions and 13 deletions.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
16 changes: 3 additions & 13 deletions config/provisioning/default.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,11 @@
### Edit the following arrays to suit your workflow - values must be quoted and separated by newlines or spaces.

DISK_GB_REQUIRED=30

MAMBA_PACKAGES=(
#"package1"
#"package2=version"
)

PIP_PACKAGES=(
#"package==version"
)


CHECKPOINT_MODELS=(
"https://huggingface.co/runwayml/stable-diffusion-v1-5/resolve/main/v1-5-pruned-emaonly.ckpt"
#"https://huggingface.co/stabilityai/stable-diffusion-2-1/resolve/main/v2-1_768-ema-pruned.ckpt"
Expand All @@ -30,6 +24,8 @@ CHECKPOINT_MODELS=(

function provisioning_start() {
source /opt/ai-dock/etc/environment.sh
source /opt/ai-dock/bin/venv-set.sh kohya

DISK_GB_AVAILABLE=$(($(df --output=avail -m "${WORKSPACE}" | tail -n1) / 1000))
DISK_GB_USED=$(($(df --output=used -m "${WORKSPACE}" | tail -n1) / 1000))
DISK_GB_ALLOCATED=$(($DISK_GB_AVAILABLE + $DISK_GB_USED))
Expand All @@ -43,15 +39,9 @@ function provisioning_start() {
provisioning_print_end
}

function provisioning_get_mamba_packages() {
if [[ -n $MAMBA_PACKAGES ]]; then
$MAMBA_INSTALL -n kohya_ss ${MAMBA_PACKAGES[@]}
fi
}

function provisioning_get_pip_packages() {
if [[ -n $PIP_PACKAGES ]]; then
micromamba run -n kohya_ss $PIP_INSTALL ${PIP_PACKAGES[@]}
"$KOHYA_VENV_PIP" install --no-cache-dir ${PIP_PACKAGES[@]}
fi
}

Expand Down

0 comments on commit 8074986

Please sign in to comment.