phamdangdangild commited on
Commit
972120a
·
verified ·
1 Parent(s): 558b53f

Fix one-file bootstrap manifest parsing

Browse files
Files changed (3) hide show
  1. FOUNDRY_STUDIO_INSTALL.bat +8 -2
  2. README.md +10 -0
  3. manifest.json +3 -3
FOUNDRY_STUDIO_INSTALL.bat CHANGED
@@ -93,7 +93,8 @@ function Get-Manifest {
93
  try {
94
  Step "Kiểm tra bản phát hành từ Hugging Face"
95
  $cacheBust = if ($url.Contains("?")) { "&" } else { "?" }
96
- $manifest = Invoke-RestMethod -Uri ($url + $cacheBust + "t=" + [DateTimeOffset]::UtcNow.ToUnixTimeSeconds()) -TimeoutSec 45
 
97
  if ($manifest.version -notmatch '^\d+\.\d+\.\d+$') { throw "version không hợp lệ" }
98
  if ($manifest.sha256 -notmatch '^[a-fA-F0-9]{64}$') { throw "SHA256 không hợp lệ" }
99
  foreach ($releaseUrl in @([string]$manifest.zip_url) + @($manifest.mirrors)) {
@@ -220,6 +221,11 @@ try {
220
  & $venvPython -c "import flask; print(flask.__version__ if hasattr(flask,'__version__') else 'Flask ready')" 2>$null | Out-Null
221
  if ($LASTEXITCODE -ne 0) { throw "Môi trường Flask chưa sẵn sàng." }
222
 
 
 
 
 
 
223
  $server = Test-StudioServer
224
  if ($server) {
225
  Good ("Studio đang chạy (version " + $server.version + "); mở thêm tab mới.")
@@ -231,7 +237,7 @@ try {
231
  $env:FM_PROFILES_DIR = $ProfilesDir
232
  $env:FM_HOST = "127.0.0.1"
233
  $env:FM_PORT = "8799"
234
- $env:FM_OPEN_BROWSER = "1"
235
  Good "Profile được lưu riêng tại $ProfilesDir"
236
  Good "Mở Studio ở tab mới: http://127.0.0.1:8799/"
237
  Set-Location $releaseDir
 
93
  try {
94
  Step "Kiểm tra bản phát hành từ Hugging Face"
95
  $cacheBust = if ($url.Contains("?")) { "&" } else { "?" }
96
+ $response = Invoke-WebRequest -UseBasicParsing -Uri ($url + $cacheBust + "t=" + [DateTimeOffset]::UtcNow.ToUnixTimeSeconds()) -TimeoutSec 45
97
+ $manifest = $response.Content | ConvertFrom-Json
98
  if ($manifest.version -notmatch '^\d+\.\d+\.\d+$') { throw "version không hợp lệ" }
99
  if ($manifest.sha256 -notmatch '^[a-fA-F0-9]{64}$') { throw "SHA256 không hợp lệ" }
100
  foreach ($releaseUrl in @([string]$manifest.zip_url) + @($manifest.mirrors)) {
 
221
  & $venvPython -c "import flask; print(flask.__version__ if hasattr(flask,'__version__') else 'Flask ready')" 2>$null | Out-Null
222
  if ($LASTEXITCODE -ne 0) { throw "Môi trường Flask chưa sẵn sàng." }
223
 
224
+ if ($env:FM_INSTALL_ONLY -eq "1") {
225
+ Good "Install-only hoàn tất; chưa khởi động local server."
226
+ exit 0
227
+ }
228
+
229
  $server = Test-StudioServer
230
  if ($server) {
231
  Good ("Studio đang chạy (version " + $server.version + "); mở thêm tab mới.")
 
237
  $env:FM_PROFILES_DIR = $ProfilesDir
238
  $env:FM_HOST = "127.0.0.1"
239
  $env:FM_PORT = "8799"
240
+ if (-not $env:FM_OPEN_BROWSER) { $env:FM_OPEN_BROWSER = "1" }
241
  Good "Profile được lưu riêng tại $ProfilesDir"
242
  Good "Mở Studio ở tab mới: http://127.0.0.1:8799/"
243
  Set-Location $releaseDir
README.md CHANGED
@@ -1,3 +1,13 @@
 
 
 
 
 
 
 
 
 
 
1
  # FoundryManager Studio
2
 
3
  Trình quản lý Microsoft Foundry chạy cục bộ trên Windows VPS. Tool quản lý subscription, resource group, Foundry resource, project, quota, model deployment, endpoint/API key và chi phí theo model.
 
1
+ ---
2
+ pretty_name: FoundryManager Studio
3
+ license: other
4
+ tags:
5
+ - azure
6
+ - microsoft-foundry
7
+ - finops
8
+ - windows
9
+ ---
10
+
11
  # FoundryManager Studio
12
 
13
  Trình quản lý Microsoft Foundry chạy cục bộ trên Windows VPS. Tool quản lý subscription, resource group, Foundry resource, project, quota, model deployment, endpoint/API key và chi phí theo model.
manifest.json CHANGED
@@ -1,8 +1,8 @@
1
- {
2
  "schema": 1,
3
  "product": "FoundryManager Studio",
4
  "version": "2.1.0",
5
- "published_at": "2026-08-05T12:09:30Z",
6
  "minimum_python": "3.10",
7
  "zip_url": "https://huggingface.co/datasets/DangPhamPham/foundrymanager-studio/resolve/main/releases/foundrymanager-studio-2.1.0.zip",
8
  "mirrors": [
@@ -11,4 +11,4 @@
11
  "sha256": "46b5003dfb960c5528f9764bd2d6cb9c80de99805665f1f4ffa8db67c4f0b09a",
12
  "size_bytes": 92759,
13
  "entrypoint": "app.py"
14
- }
 
1
+ {
2
  "schema": 1,
3
  "product": "FoundryManager Studio",
4
  "version": "2.1.0",
5
+ "published_at": "2026-08-05T12:15:17Z",
6
  "minimum_python": "3.10",
7
  "zip_url": "https://huggingface.co/datasets/DangPhamPham/foundrymanager-studio/resolve/main/releases/foundrymanager-studio-2.1.0.zip",
8
  "mirrors": [
 
11
  "sha256": "46b5003dfb960c5528f9764bd2d6cb9c80de99805665f1f4ffa8db67c4f0b09a",
12
  "size_bytes": 92759,
13
  "entrypoint": "app.py"
14
+ }