Skip to content

Commit 9aeae25

Browse files
Add libraries downloader package
1 parent ed79a16 commit 9aeae25

11 files changed

Lines changed: 86 additions & 370 deletions

File tree

composer.json

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,11 @@
1515
"require": {
1616
"php": "^8.1",
1717
"ext-ffi": "*",
18-
"ankane/onnxruntime": "^0.2.0",
19-
"guzzlehttp/guzzle": "^7.0",
2018
"codewithkyrian/jinja-php": "^1.0",
21-
"codewithkyrian/onnxruntime-downloader-plugin": "^1.1",
22-
"symfony/console": "^6.4|^7.0",
19+
"codewithkyrian/transformers-libraries-downloader": "^1.0@dev",
2320
"imagine/imagine": "^1.3",
21+
"guzzlehttp/guzzle": "^7.0",
22+
"symfony/console": "^6.4|^7.0",
2423
"rokka/imagine-vips": "^0.31.0",
2524
"rindow/rindow-math-matrix": "^2.0",
2625
"rindow/rindow-matlib-ffi": "^1.0",
@@ -40,6 +39,12 @@
4039
"src/Utils/Helpers.php"
4140
]
4241
},
42+
"repositories": [
43+
{
44+
"type": "vcs",
45+
"url": "https://github.com/CodeWithKyrian/transformers-libraries-downloader"
46+
}
47+
],
4348
"authors": [
4449
{
4550
"name": "Kyrian Obikwelu",
@@ -49,9 +54,10 @@
4954
"config": {
5055
"allow-plugins": {
5156
"pestphp/pest-plugin": true,
52-
"codewithkyrian/onnxruntime-downloader-plugin": true
57+
"codewithkyrian/transformers-libraries-downloader": true
5358
}
5459
},
60+
"minimum-stability": "dev",
5561
"bin": [
5662
"bin/transformers"
5763
],

examples/composer.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,15 @@
2424
{
2525
"type": "path",
2626
"url": "../"
27+
},
28+
{
29+
"type": "vcs",
30+
"url": "https://github.com/CodeWithKyrian/transformers-libraries-downloader"
2731
}
2832
],
2933
"config": {
3034
"allow-plugins": {
31-
"codewithkyrian/onnxruntime-downloader-plugin": true
35+
"codewithkyrian/transformers-libraries-downloader": true
3236
}
3337
}
3438
}

libs/.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1-
/*
1+
/*
2+
!VERSIONS
3+
!downloader

libs/VERSIONS

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
TRANSFORMERS_PHP=0.4.0
2+
OPENBLAS=0.3.27
3+
RINDOW_MATLIB=1.0.0
4+
ONNXRUNTIME=1.17.0

src/Libraries.php

Lines changed: 0 additions & 313 deletions
This file was deleted.

src/OnnxRuntime/ExecutionMode.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
<?php
22

3+
/**
4+
* This file is a modified version of the original file from the onnxruntime-php repository.
5+
*
6+
* Original source: https://github.com/ankane/onnxruntime-php/blob/master/src/ExecutionMode.php
7+
* The original file is licensed under the MIT License.
8+
*/
9+
310
declare(strict_types=1);
411

512
namespace Codewithkyrian\Transformers\OnnxRuntime;

0 commit comments

Comments
 (0)