@icyfenix-dmla/cli 2026.5.2-2234 → 2026.5.2-2258
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/server/sandbox.js +5 -3
- package/version.json +2 -2
package/package.json
CHANGED
package/src/server/sandbox.js
CHANGED
|
@@ -417,10 +417,12 @@ export async function runPythonCode(code, useGpu = false, imageOverride = null,
|
|
|
417
417
|
console.log(`[Sandbox] 提示: 运行 'dmla data' 创建数据目录`)
|
|
418
418
|
}
|
|
419
419
|
|
|
420
|
-
//
|
|
420
|
+
// 挂载共享模块到 /workspace/shared(而非 site-packages)
|
|
421
|
+
// 原因:PYTHONPATH=/workspace,这样 Python 可以直接导入 shared.xxx
|
|
422
|
+
// 避免 Windows Docker 的 site-packages 路径兼容性问题
|
|
421
423
|
if (useMount && sharedModulesPath && fs.existsSync(sharedModulesPath)) {
|
|
422
|
-
binds.push(`${sharedModulesPath}:/
|
|
423
|
-
console.log(`[Sandbox] 共享模块 Volume Mount: ${sharedModulesPath}`)
|
|
424
|
+
binds.push(`${sharedModulesPath}:/workspace/shared:ro`)
|
|
425
|
+
console.log(`[Sandbox] 共享模块 Volume Mount: ${sharedModulesPath} -> /workspace/shared`)
|
|
424
426
|
} else if (useMount && sharedModulesPath) {
|
|
425
427
|
console.warn(`[Sandbox] 警告: 共享模块目录不存在: ${sharedModulesPath}`)
|
|
426
428
|
}
|
package/version.json
CHANGED