Skip to content

Commit 90ef5ab

Browse files
authored
chore: install models to SNAP_COMMON, upgrade build-snaps to stable (#56)
1 parent f0e27cc commit 90ef5ab

File tree

2 files changed

+14
-13
lines changed

2 files changed

+14
-13
lines changed

bin/fetch-models

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,16 @@ set -o pipefail
66

77
SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd -P)
88

9-
MODELS="${SNAP_DATA}/models/openvino-models"
10-
MUSICGEN_TMP="${SNAP_DATA}/tmp/musicgen_tmp"
9+
MODELS="${SNAP_COMMON}/models/openvino-models"
10+
MUSICGEN_TMP="${SNAP_COMMON}/tmp/musicgen_tmp"
1111
MUSICGEN="${MODELS}/musicgen"
12-
WHISPER_TMP="${SNAP_DATA}/tmp/whisper_tmp"
12+
WHISPER_TMP="${SNAP_COMMON}/tmp/whisper_tmp"
1313
WHISPER="${MODELS}"
14-
SEPARATION_TMP="${SNAP_DATA}/tmp/separation_tmp"
14+
SEPARATION_TMP="${SNAP_COMMON}/tmp/separation_tmp"
1515
SEPARATION="${MODELS}"
16-
SUPPRESSION_TMP="${SNAP_DATA}/tmp/suppression_tmp"
16+
SUPPRESSION_TMP="${SNAP_COMMON}/tmp/suppression_tmp"
1717
SUPPRESSION="${MODELS}"
18-
RESOLUTION_TMP="${SNAP_DATA}/tmp/resolution_tmp"
18+
RESOLUTION_TMP="${SNAP_COMMON}/tmp/resolution_tmp"
1919
RESOLUTION="${MODELS}/audiosr"
2020

2121
usage() {
@@ -24,7 +24,7 @@ Usage: $(basename "${BASH_SOURCE[0]}") [-h] [-v] [-b]
2424
2525
Manage the installation of OpenVINO™ AI models for Audacity.
2626
27-
This command must be run with sudo as it installs models to ${SNAP_DATA}, where write access
27+
This command must be run with sudo as it installs models to ${SNAP_COMMON}, where write access
2828
is only permitted for the root user.
2929
3030
Available options:
@@ -171,6 +171,7 @@ Downloading Super Resolution models from Hugging Face. Please be patient!
171171
"
172172
silent git clone https://huggingface.co/Intel/versatile_audio_super_resolution_openvino "${RESOLUTION_TMP}"
173173
cd "${RESOLUTION_TMP}"
174+
silent git checkout 9a97d7f128b22aea72e92862a3eccc310f88ac26
174175
silent git lfs install
175176
silent git lfs pull
176177
mkdir -p "${RESOLUTION}"
@@ -244,7 +245,7 @@ fi
244245

245246
if [ "${SNAP_UID}" -ne 0 ]; then
246247
>&2 echo "
247-
This tool installs models to ${SNAP_DATA},
248+
This tool installs models to ${SNAP_COMMON},
248249
where write access is only permitted for the root user.
249250
Please re-run the command with sudo:
250251

snap/snapcraft.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ layout:
5454
/usr/share/locale:
5555
bind: $SNAP/usr/share/locale
5656
$SNAP/usr/lib/openvino-models:
57-
bind: $SNAP_DATA/models/openvino-models
57+
bind: $SNAP_COMMON/models/openvino-models
5858
/etc/gitconfig:
5959
bind-file: $SNAP_DATA/etc/gitconfig
6060

@@ -129,7 +129,7 @@ parts:
129129
build-packages:
130130
- libtbb-dev
131131
build-snaps:
132-
- openvino-toolkit-2404/2024/beta
132+
- openvino-toolkit-2404/2024/stable
133133
build-environment:
134134
- OpenVINO_DIR: /snap/openvino-toolkit-2404/current/usr/lib/x86_64-linux-gnu/cmake
135135
override-build: |
@@ -201,7 +201,7 @@ parts:
201201
cmake --install . --config Release --prefix ${CRAFT_PART_INSTALL}/usr/local/whisper.cpp
202202
fi
203203
build-snaps:
204-
- openvino-toolkit-2404/2024/beta
204+
- openvino-toolkit-2404/2024/stable
205205
build-environment:
206206
- LIBTORCH_ROOTDIR: $CRAFT_STAGE/usr/local/libtorch
207207
- OpenVINO_DIR: /snap/openvino-toolkit-2404/current/usr/lib/x86_64-linux-gnu/cmake
@@ -307,7 +307,7 @@ parts:
307307
- zlib1g
308308
- zlib1g-dev
309309
build-snaps:
310-
- openvino-toolkit-2404/2024/beta
310+
- openvino-toolkit-2404/2024/stable
311311
stage-packages:
312312
- libavcodec60
313313
- libavformat60
@@ -357,7 +357,7 @@ parts:
357357
- libwxgtk3.2-1t64
358358
- zlib1g
359359
stage-snaps:
360-
- openvino-toolkit-2404/2024/beta
360+
- openvino-toolkit-2404/2024/stable
361361

362362
fetch-models:
363363
plugin: dump

0 commit comments

Comments
 (0)