Skip to content

Commit 3beb3dc

Browse files
authored
Merge pull request #836 from m0nsky/july-2024-binaries
Fix possible file locks due to race conditions during build & test
2 parents 81c4230 + d4fadf9 commit 3beb3dc

File tree

2 files changed

+52
-24
lines changed

2 files changed

+52
-24
lines changed

LLama.Unittest/LLama.Unittest.csproj

Lines changed: 32 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,39 @@
2727
</PackageReference>
2828
</ItemGroup>
2929

30-
<Target Name="DownloadContentFiles" BeforeTargets="Build">
31-
<DownloadFile SourceUrl="https://huggingface.co/TheBloke/Llama-2-7b-Chat-GGUF/resolve/main/llama-2-7b-chat.Q3_K_S.gguf" DestinationFolder="Models" DestinationFileName="llama-2-7b-chat.Q3_K_S.gguf" SkipUnchangedFiles="true"></DownloadFile>
32-
<DownloadFile SourceUrl="https://huggingface.co/cjpais/llava-1.6-mistral-7b-gguf/resolve/main/llava-v1.6-mistral-7b.Q3_K_XS.gguf" DestinationFolder="Models" DestinationFileName="llava-v1.6-mistral-7b.Q3_K_XS.gguf" SkipUnchangedFiles="true"></DownloadFile>
33-
<DownloadFile SourceUrl="https://huggingface.co/cjpais/llava-1.6-mistral-7b-gguf/resolve/main/mmproj-model-f16.gguf" DestinationFolder="Models" DestinationFileName="mmproj-model-f16.gguf" SkipUnchangedFiles="true"></DownloadFile>
34-
<DownloadFile SourceUrl="https://huggingface.co/leliuga/all-MiniLM-L12-v2-GGUF/resolve/main/all-MiniLM-L12-v2.Q8_0.gguf" DestinationFolder="Models" DestinationFileName="all-MiniLM-L12-v2.Q8_0.gguf" SkipUnchangedFiles="true"></DownloadFile>
35-
30+
<Target Name="DownloadContentFilesInner">
31+
32+
<DownloadFile
33+
SourceUrl="https://huggingface.co/TheBloke/Llama-2-7b-Chat-GGUF/resolve/main/llama-2-7b-chat.Q3_K_S.gguf"
34+
DestinationFolder="Models"
35+
DestinationFileName="llama-2-7b-chat.Q3_K_S.gguf"
36+
SkipUnchangedFiles="true">
37+
</DownloadFile>
38+
39+
<DownloadFile
40+
SourceUrl="https://huggingface.co/cjpais/llava-1.6-mistral-7b-gguf/resolve/main/llava-v1.6-mistral-7b.Q3_K_XS.gguf"
41+
DestinationFolder="Models" DestinationFileName="llava-v1.6-mistral-7b.Q3_K_XS.gguf"
42+
SkipUnchangedFiles="true">
43+
</DownloadFile>
44+
45+
<DownloadFile
46+
SourceUrl="https://huggingface.co/cjpais/llava-1.6-mistral-7b-gguf/resolve/main/mmproj-model-f16.gguf"
47+
DestinationFolder="Models"
48+
DestinationFileName="mmproj-model-f16.gguf"
49+
SkipUnchangedFiles="true">
50+
</DownloadFile>
3651

52+
<DownloadFile
53+
SourceUrl="https://huggingface.co/leliuga/all-MiniLM-L12-v2-GGUF/resolve/main/all-MiniLM-L12-v2.Q8_0.gguf"
54+
DestinationFolder="Models"
55+
DestinationFileName="all-MiniLM-L12-v2.Q8_0.gguf"
56+
SkipUnchangedFiles="true">
57+
</DownloadFile>
58+
59+
</Target>
60+
61+
<Target Name="DownloadContentFiles" BeforeTargets="DispatchToInnerBuilds;BeforeBuild">
62+
<MSBuild Projects="$(MSBuildProjectFile)" Targets="DownloadContentFilesInner" Properties="TargetFramework=once" />
3763
</Target>
3864

3965
<ItemGroup>

LLama/LLamaSharp.csproj

Lines changed: 20 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -52,26 +52,28 @@
5252
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="8.0.1" />
5353
</ItemGroup>
5454

55-
55+
<Target Name="DownloadReleaseBinariesInner">
5656
<PropertyGroup>
5757
<BinaryReleaseId>1c5eba6f8e62</BinaryReleaseId>
5858
</PropertyGroup>
59+
<Message Importance="High" Text="Download '$(BinaryReleaseId)/deps.zip' to 'runtimes'" />
60+
<DownloadFile
61+
SourceUrl="https://github.com/martindevans/LLamaSharpBinaries/releases/download/$(BinaryReleaseId)/deps.zip"
62+
DestinationFolder="runtimes"
63+
DestinationFileName="deps.zip"
64+
SkipUnchangedFiles="true"
65+
/>
5966

60-
<Target Name="DownloadReleaseBinaries" BeforeTargets="DispatchToInnerBuilds">
61-
<Message Importance="High" Text="Download '$(BinaryReleaseId)/deps.zip' to 'runtimes'" />
62-
<DownloadFile
63-
SourceUrl="https://github.com/martindevans/LLamaSharpBinaries/releases/download/$(BinaryReleaseId)/deps.zip"
64-
DestinationFolder="runtimes"
65-
DestinationFileName="deps.zip"
66-
SkipUnchangedFiles="true"
67-
/>
68-
69-
<Message Importance="High" Text="Unzip '$(BinaryReleaseId)/deps.zip'" />
70-
<Unzip
71-
SourceFiles="runtimes/deps.zip"
72-
DestinationFolder="runtimes/deps/"
73-
OverwriteReadOnlyFiles="false"
74-
Include="*.dll;*.so;*.dylib;*.metal;"
75-
/>
76-
</Target>
67+
<Message Importance="High" Text="Unzip '$(BinaryReleaseId)/deps.zip'" />
68+
<Unzip
69+
SourceFiles="runtimes/deps.zip"
70+
DestinationFolder="runtimes/deps/"
71+
OverwriteReadOnlyFiles="false"
72+
Include="*.dll;*.so;*.dylib;*.metal;"
73+
/>
74+
</Target>
75+
<Target Name="DownloadReleaseBinaries" BeforeTargets="DispatchToInnerBuilds;BeforeBuild">
76+
<MSBuild Projects="$(MSBuildProjectFile)" Targets="DownloadReleaseBinariesInner" Properties="TargetFramework=once" />
77+
</Target>
78+
7779
</Project>

0 commit comments

Comments
 (0)