Skip to content

Commit 1acab76

Browse files
authored
Merge branch 'main' into security/pin-hf-model-revisions
2 parents 81dbe85 + c871fde commit 1acab76

15 files changed

Lines changed: 622 additions & 94 deletions

File tree

.github/workflows/release.yml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -76,18 +76,23 @@ jobs:
7676
echo "Using version ${{ github.event.inputs.version }}"
7777
echo "RELEASE_VERSION=${{ github.event.inputs.version }}" >> $GITHUB_ENV
7878
79-
- name: Set up .NET 9
79+
- name: Set up .NET
8080
uses: actions/setup-dotnet@v3
8181
with:
82-
# Net 8 needed for PupNet
82+
# Net 9 for app, Net 8 for PupNet 1.9
8383
dotnet-version: |
8484
8.0.x
8585
9.0.x
8686
87-
- name: Install PupNet
87+
- name: Install AppImage build dependencies
8888
run: |
89-
sudo apt-get -y install libfuse2
90-
dotnet tool install -g KuiperZone.PupNet --version 1.8.0
89+
sudo apt-get -y install fuse3
90+
wget -q https://github.com/AppImage/appimagetool/releases/download/continuous/appimagetool-x86_64.AppImage
91+
sudo mv appimagetool-x86_64.AppImage /usr/local/bin/
92+
sudo chmod +x /usr/local/bin/appimagetool-x86_64.AppImage
93+
94+
- name: Install PupNet
95+
run: dotnet tool install -g KuiperZone.PupNet --version 1.9.1
9196

9297
- name: PupNet Build
9398
env:

CONTRIBUTING.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,13 @@ The `output_dir` environment variable can be specified or defaults to `./out/osx
2020
```
2121
### Linux
2222
```bash
23-
sudo apt-get -y install libfuse2
24-
dotnet tool install -g KuiperZone.PupNet
23+
sudo apt-get -y install fuse3
24+
# Download appimagetool (uses static type2-runtime; end users still need
25+
# fusermount or fusermount3 setuid helper on their system, or can use
26+
# --appimage-extract-and-run as a fallback)
27+
sudo wget -q https://github.com/AppImage/appimagetool/releases/download/continuous/appimagetool-x86_64.AppImage -O /usr/local/bin/appimagetool
28+
sudo chmod +x /usr/local/bin/appimagetool
29+
dotnet tool install -g KuiperZone.PupNet --version 1.9.1
2530
pupnet -r linux-x64 -c Release --kind appimage --app-version $RELEASE_VERSION --clean
2631
```
2732

Jenkinsfile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,13 @@ node("Diligence") {
3333
}
3434

3535
stage('Publish Linux') {
36+
// Prerequisites on Jenkins agent:
37+
// - fuse3 (provides fusermount3 for appimagetool AppImage)
38+
// - appimagetool in $PATH (/usr/local/bin/)
39+
// - pupnet 1.9.1 globally installed
3640
sh "rm -rf StabilityMatrix.Avalonia/bin/*"
3741
sh "rm -rf StabilityMatrix.Avalonia/obj/*"
38-
sh "/home/jenkins/.dotnet/tools/pupnet --runtime linux-x64 --kind appimage --app-version ${version} --clean -y"
42+
sh "/home/jenkins/.dotnet/tools/pupnet -r linux-x64 -c Release --kind appimage --app-version $RELEASE_VERSION --clean"
3943
}
4044
}
4145
} finally {

StabilityMatrix.Avalonia.pupnet.conf

Lines changed: 89 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
################################################################################
2-
# PUPNET DEPLOY: 1.4.0
2+
# PUPNET DEPLOY: 1.9.1
33
################################################################################
44

55
########################################
@@ -14,7 +14,7 @@ AppBaseName = StabilityMatrix.Avalonia
1414
# Mandatory application friendly name.
1515
AppFriendlyName = Stability Matrix
1616

17-
# Mandatory application ID in reverse DNS form. This should stay constant for lifetime of the software.
17+
# Mandatory application ID in reverse DNS form. The value should stay constant for lifetime of the software.
1818
AppId = zone.lykos.stabilitymatrix
1919

2020
# Mandatory application version and package release of form: 'VERSION[RELEASE]'. Use optional square
@@ -23,17 +23,18 @@ AppId = zone.lykos.stabilitymatrix
2323
# to '1'. Note that the version-release value given here may be overridden from the command line.
2424
AppVersionRelease = 2.0.0[1]
2525

26-
# Mandatory single line application short summary description.
26+
# Mandatory single line application summary text in default (English) language.
2727
AppShortSummary = Package and checkpoint manager for Stable Diffusion.
2828

29-
# Optional multi-line (surround with triple """ quotes) application description which may provide
30-
# longer text than AppShortSummary. Text separated by an empty line will be treated as paragraphs
31-
# (complex formatting should be avoided). The content is used by package builders where supported,
32-
# including RPM and DEB, and may optionally be used to populate the '<description>' element in the
33-
# AppStream metadata through the use of a macro variable.
34-
AppDescription =
29+
# Multi-line (surround with triple """ quotes) application description which provides longer explanation
30+
# than AppShortSummary in default language. Optional but it is recommended to specify this. Text
31+
# separated by an empty line will be treated as separate paragraphs. Avoid complex formatting, and do not
32+
# use HTML or markdown, other than list items beginning with "* ", "+ " or "- ". This content is
33+
# used by package builders where supported, including RPM and DEB, and is used to populate the
34+
# ${APPSTREAM_DESCRIPTION_XML} element used within AppStream metadata.
35+
AppDescription =
3536

36-
# Mandatory application license ID. This should be one of the recognised SPDX license
37+
# Mandatory application license ID. This should be one of the recognized SPDX license
3738
# identifiers, such as: 'MIT', 'GPL-3.0-or-later' or 'Apache-2.0'. For a proprietary or
3839
# custom license, use 'LicenseRef-Proprietary' or 'LicenseRef-LICENSE'.
3940
AppLicenseId = LicenseRef-Proprietary
@@ -45,19 +46,23 @@ AppLicenseFile = LICENSE
4546
# Optional path to application changelog file. IMPORTANT. If given, this file should contain version
4647
# information in a predefined format. Namely, it should contain one or more version headings of form:
4748
# '+ VERSION;DATE', under which are to be listed change items of form: '- Change description'. Formatted
48-
# information will be parsed and used to populate AppStream metadata. Additionally, it will be packaged
49-
# with the application and used with package builders where supported. NOTE. Superfluous text in the file
50-
# is ignored, so the file may also contain README information.
51-
# For information: https://github.com/kuiperzone/PupNet-Deploy.
52-
AppChangeFile =
49+
# information will be parsed and used to expand the ${APPSTREAM_CHANGELOG_XML} macro used
50+
# for AppStream metadata (superfluous text is ignored, so the file may also contain README information).
51+
# The given file will also be packaged with the application verbatim. See: https://github.com/kuiperzone/PupNet-Deploy.
52+
AppChangeFile =
5353

5454
########################################
5555
# PUBLISHER
5656
########################################
5757

58-
# Mandatory publisher, group or creator.
58+
# Mandatory publisher, group or creator name.
5959
PublisherName = Lykos
6060

61+
# Publisher ID in reverse DNS form. Invariably, this would be the same as AppId, excluding the app leaf
62+
# name. The value populates the ${PUBLISHER_ID} macro used AppStream metainfo. If omitted, defaults to
63+
# the leading parts of AppId. It is highly recommended to specify the value explicitly.
64+
PublisherId = zone.lykos
65+
6166
# Optional copyright statement.
6267
PublisherCopyright = Copyright (C) Lykos 2023
6368

@@ -66,13 +71,19 @@ PublisherCopyright = Copyright (C) Lykos 2023
6671
# an item in program menu entries. Do not modify name, as may leave old entries in updated installations.
6772
PublisherLinkName = Home Page
6873

69-
# Optional publisher or application web-link URL.
74+
# Publisher or application web-link URL. Although optional, it should be considered mandatory if using
75+
# MetaFile
7076
PublisherLinkUrl = https://lykos.ai
7177

7278
# Publisher or maintainer email contact. Although optional, some package builders (i.e. DEB) require it
7379
# and may warn or fail unless provided.
7480
PublisherEmail = stability-matrix@lykos.ai
7581

82+
# Publisher GPG key fingerprint for Linux package signing. This must be in the keyring and is used for AppImage,
83+
# RPM and Flatpak (Deb files are not signed). Do NOT include spaces. If the key requires a passphrase, the build may
84+
# require desktop specific interaction. Signing is optional but recommended. Leave blank to disable.
85+
PublisherGpgKeyId =
86+
7687
########################################
7788
# DESKTOP INTEGRATION
7889
########################################
@@ -92,7 +103,7 @@ DesktopTerminal = false
92103
# in order to use the correct install location. Other macros may be used to help automate the content.
93104
# Note. PupNet Deploy can generate you a desktop file. Use --help and 'pupnet --help macro' for reference.
94105
# See: https://specifications.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html
95-
DesktopFile =
106+
DesktopFile =
96107

97108
# Optional command name to start the application from the terminal. If, for example, AppBaseName is
98109
# 'Zone.Kuiper.HelloWorld', the value here may be set to a simpler and/or lower-case variant such as
@@ -102,7 +113,7 @@ DesktopFile =
102113
# supported for all packages kinds (i.e. Flatpak). Default is empty (none).
103114
StartCommand = stabilitymatrix
104115

105-
# Optional category for the application. The value should be one of the recognised Freedesktop top-level
116+
# Optional category for the application. The value should be one of the recognized Freedesktop top-level
106117
# categories, such as: Audio, Development, Game, Office, Utility etc. Only a single value should be
107118
# provided here which will be used, where supported, to populate metadata. The default is empty.
108119
# See: https://specifications.freedesktop.org/menu-spec/latest/apa.html
@@ -111,7 +122,7 @@ PrimeCategory = Utility
111122
# Path to AppStream metadata file. It is optional, but recommended as it is used by software centers.
112123
# Note. The contents of the files may use macro variables. Use 'pupnet --help macro' for reference.
113124
# See: https://docs.appimage.org/packaging-guide/optional/appstream.html
114-
MetaFile =
125+
MetaFile =
115126

116127
# Optional icon file paths. The value may include multiple filenames separated with semicolon or given
117128
# in multi-line form. Valid types are SVG, PNG and ICO (ICO ignored on Linux). Note that the inclusion
@@ -126,10 +137,10 @@ IconFiles = """
126137
# DOTNET PUBLISH
127138
########################################
128139

129-
# Optional path relative to this file in which to find the dotnet project (.csproj) or solution (.sln)
130-
# file, or the directory containing it. If empty (default), a single project or solution file is
131-
# expected under the same directory as this file. IMPORTANT. If set to 'NONE', dotnet publish
132-
# is disabled (not called). Instead, only DotnetPostPublish is called.
140+
# Optional path relative to this file in which to find the dotnet project (.csproj) file, or the
141+
# directory containing it. If empty (default), a single project file is expected under the same
142+
# directory as this file. IMPORTANT. If set to 'NONE', dotnet publish is disabled
143+
# (i.e. not called). Instead, only DotnetPostPublish is called.
133144
DotnetProjectPath = StabilityMatrix.Avalonia/StabilityMatrix.Avalonia.csproj
134145

135146
# Optional arguments supplied to 'dotnet publish'. Do NOT include '-r' (runtime), or '-c' (configuration)
@@ -144,16 +155,15 @@ DotnetPublishArgs = -p:Version=${APP_VERSION} -p:PublishReadyToRun=true -p:Publi
144155
# publish, but before the final output is built. This could, for example, be a script which copies
145156
# additional files into the build directory given by ${BUILD_APP_BIN}. The working directory will be
146157
# the location of this file. This value is optional, but becomes mandatory if DotnetProjectPath equals
147-
# 'NONE'. Note. This value may use macro variables. Additionally, scripts may use these as environment
148-
# variables. Use 'pupnet --help macro' for reference.
149-
DotnetPostPublish =
158+
# 'NONE'. This value may use macro variables. The script may also use these as environment
159+
# variables, such as ${BUILD_APP_BIN}. See 'pupnet --help macro' for reference.
160+
DotnetPostPublish =
150161

151-
# Post-publish (or standalone build) command on Windows (ignored on Linux). This should perform
152-
# the equivalent operation, as required, as DotnetPostPublish, but using DOS commands and batch
153-
# scripts. Multiple commands may be specified, separated by semicolon or given in multi-line form.
154-
# Note. This value may use macro variables. Additionally, scripts may use these as environment
155-
# variables. Use 'pupnet --help macro' for reference.
156-
DotnetPostPublishOnWindows =
162+
# Post-publish (or standalone build) command on Windows (ignored on Linux). This should perform the
163+
# equivalent operation as DotnetPostPublish, but using a Windows specific script. This value may use
164+
# macro variables. The script may also use these as environment variables, such as %BUILD_APP_BIN%.
165+
# See 'pupnet --help macro' for reference.
166+
DotnetPostPublishOnWindows =
157167

158168
########################################
159169
# PACKAGE OUTPUT
@@ -173,8 +183,18 @@ OutputDirectory = Release/linux-x64
173183
# APPIMAGE OPTIONS
174184
########################################
175185

176-
# Additional arguments for use with appimagetool. Useful for signing. Default is empty.
177-
AppImageArgs =
186+
# Additional arguments for use with appimagetool, i.e. '--no-appstream' to disable pedantic metadata checking.
187+
# Do not use for signing if PublisherGpgKeyId is used. Default is empty.
188+
AppImageArgs =
189+
190+
# Optional path to AppImage fuse runtime(s), but not to be confused with .NET runtime ID. If AppImageRuntimePath is
191+
# left empty (default), appimagetool will download the latest runtime automatically. Specifying a path here avoids
192+
# the need for an internet connection during build, and fixes the runtime version. If AppImageRuntimePath
193+
# points to a file, the value is supplied directly to appimagetool using '--runtime-file'. If it points to a
194+
# directory, the directory should contain expected runtimes, which will be selected for the target architecture,
195+
# namely one of: runtime-aarch64, runtime-armhf, runtime-i686 or runtime-x86_64. Runtimes can be downloaded:
196+
# https://github.com/AppImage/type2-runtime/releases
197+
AppImageRuntimePath =
178198

179199
# Boolean (true or false) which sets whether to include the application version in the AppImage filename,
180200
# i.e. 'HelloWorld-1.2.3-x86_64.AppImage'. Default is false. It is ignored if the output filename is
@@ -198,19 +218,27 @@ FlatpakPlatformSdk = org.freedesktop.Sdk
198218
FlatpakPlatformVersion = 22.08
199219

200220
# Flatpak manifest 'finish-args' sandbox permissions. Optional, but if empty, the application will have
201-
# extremely limited access to the host environment. This option may be used to grant required
202-
# application permissions. Values here should be prefixed with '--' and separated by semicolon or given
203-
# in multi-line form. Refer: https://docs.flatpak.org/en/latest/sandbox-permissions.html
221+
# extremely limited access to the host environment and may not work. Values here should be prefixed with '--'
222+
# and separated by semicolon or given in multi-line form. The default includes only "--socket=x11" as Avalonia
223+
# currently supports X11. Other common permissions:
224+
# --socket=wayland
225+
# --socket=fallback-x11
226+
# --share=network
227+
# --socket=pulseaudio
228+
# --socket=cups
229+
# --filesystem=/home
230+
# --filesystem=/tmp
231+
# Refer: https://docs.flatpak.org/en/latest/sandbox-permissions.html
204232
FlatpakFinishArgs = """
205233
--socket=wayland
206234
--socket=x11
207235
--filesystem=host
208236
--share=network
209237
"""
210238

211-
# Additional arguments for use with flatpak-builder. Useful for signing. Default is empty.
212-
# See flatpak-builder --help.
213-
FlatpakBuilderArgs =
239+
# Additional arguments for use with flatpak-builder. Do not use for signing if PublisherGpgKeyId is used.
240+
# Default is empty. See flatpak-builder --help.
241+
FlatpakBuilderArgs =
214242

215243
########################################
216244
# RPM OPTIONS
@@ -262,6 +290,12 @@ DebianRecommends = """
262290
# WINDOWS SETUP OPTIONS
263291
########################################
264292

293+
# Optional application group name used as the Start Menu folder and install directory under Program Files.
294+
# Specifically, it is used to define the InnoSetup DefaultGroupName and DefaultDirName parameters.
295+
# If empty (default), suitable values are used based on your application.
296+
# See: https://jrsoftware.org/ishelp/index.php?topic=setup_defaultgroupname
297+
SetupGroupName =
298+
265299
# Boolean (true or false) which specifies whether the application is to be installed in administrative
266300
# mode, or per-user. Default is false. See: https://jrsoftware.org/ishelp/topic_admininstallmode.htm
267301
SetupAdminInstall = false
@@ -279,14 +313,26 @@ SetupMinWindowsVersion = 10
279313
# Optional name and parameters of the Sign Tool to be used to digitally sign: the installer,
280314
# uninstaller, and contained exe and dll files. If empty, files will not be signed.
281315
# See: https://jrsoftware.org/ishelp/topic_setup_signtool.htm
282-
SetupSignTool =
316+
SetupSignTool =
283317

284318
# Optional suffix for the installer output filename. The default is empty, but you may wish set it to:
285319
# 'Setup' or similar. This, for example, will output a file of name: HelloWorldSetup-x86_64.exe
286320
# Ignored if the output filename is specified at command line.
287-
SetupSuffixOutput =
321+
SetupSuffixOutput =
288322

289323
# Boolean (true or false) which sets whether to include the application version in the setup filename,
290324
# i.e. 'HelloWorld-1.2.3-x86_64.exe'. Default is false. Ignored if the output filename is specified
291325
# at command line.
292326
SetupVersionOutput = false
327+
328+
# Optional name of a script to run before uninstall with InnoSetup. The file is relative to the directory of the
329+
# application and must have a default file association. This binds to the `[UninstallRun]` section of InnoSetup.
330+
SetupUninstallScript =
331+
332+
########################################
333+
# ZIP OPTIONS
334+
########################################
335+
336+
# Boolean (true or false) which sets whether to include the application version in the zip/tar.gz filename, i.e.
337+
# 'HelloWorld-1.2.3-x86_64.zip'. Default is true. It is ignored if the output filename is specified at command line.
338+
ZipVersionOutput = true

StabilityMatrix.Core/Helper/Factory/PackageFactory.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,8 @@ public BasePackage GetNewBasePackage(InstalledPackage installedPackage)
120120
downloadService,
121121
prerequisiteHelper,
122122
pyInstallationManager,
123-
pipWheelService
123+
pipWheelService,
124+
rocmPackageHelper
124125
),
125126
"RuinedFooocus" => new RuinedFooocus(
126127
githubApiCache,

StabilityMatrix.Core/Models/PackageModification/InstallWindowsRocmPackageCommandStep.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ IRocmPackageHelper rocmPackageHelper
2525
) : IPackageStep
2626
{
2727
private const string BitsAndBytesWheelUrl =
28-
"https://github.com/0xDELUXA/bitsandbytes_win_rocm/releases/download/0.50.0.dev0-py3-rocm7-win_amd64_all/bitsandbytes-0.50.0.dev0-cp312-cp312-win_amd64.whl";
28+
"https://github.com/0xDELUXA/bitsandbytes_win_rocm/releases/download/0.50.0.dev0-py3.12-rocm7.15-win_amd64_all/bitsandbytes-0.50.0.dev0-cp312-cp312-win_amd64.whl";
2929
private const string AmdAiterWheelUrl =
3030
"https://github.com/0xDELUXA/flash-attention/releases/download/v2.8.4_win-rocm/amd_aiter-0.0.0-py3-none-win_amd64.whl";
3131
private const string FlashAttentionWheelUrl =

0 commit comments

Comments
 (0)