Skip to content

Commit 287e380

Browse files
committed
fix: ossConfig auto
1 parent 614c4f7 commit 287e380

3 files changed

Lines changed: 6 additions & 7 deletions

File tree

__tests__/e2e/model/deploy_and_test_model.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ def deploy_model(model_id: str, region: str = "cn-hangzhou", storage: str = "nas
125125
# 遍历 entrypoint 数组,替换包含 /mnt/ 的路径
126126
for i, item in enumerate(entrypoint):
127127
if isinstance(item, str) and "/mnt/" in item and not item.startswith("vllm") and not item.isdigit() and item not in ["--port", "--served-model-name", "--trust-remote-code"]:
128-
entrypoint[i] = f"/mnt/serverless-{region}-d5d4cd07-616a-5428-91b7-ec2d0257b3a2"
128+
entrypoint[i] = f"/mnt/serverless-{region}-d70a9a8a-c817-5ed1-a293-4be0908f0a5"
129129
custom_container_config["entrypoint"] = entrypoint
130130

131131
# 保存配置到临时文件

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
"@serverless-cd/srm-aliyun-pop-core": "^0.0.8-beta.1",
3030
"@serverless-cd/srm-aliyun-ram20150501": "^0.0.2-beta.9",
3131
"@serverless-cd/srm-aliyun-sls20201230": "0.0.5-beta.3",
32-
"@serverless-cd/srm-aliyun-oss": "^0.0.1-beta.6",
32+
"@serverless-cd/srm-aliyun-oss": "^0.0.1-beta.7",
3333
"@serverless-devs/diff": "^0.0.3-beta.6",
3434
"@serverless-devs/downloads": "^0.0.7",
3535
"@serverless-devs/load-component": "^0.0.9",

src/resources/oss/index.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,24 @@
11
import { ICredentials } from '@serverless-devs/component-interface';
22
import Oss from '@serverless-cd/srm-aliyun-oss';
3-
import { Config } from '@alicloud/openapi-client';
43
import { IRegion } from '../../interface';
54
import logger from '../../logger';
65
import { isAppCenter } from '../../utils/index';
76

87
export default class OSS {
98
readonly client: Oss;
10-
private config: Config;
9+
private config: any;
1110

1211
constructor(private region: IRegion, credentials: ICredentials, ossEndpoint: string) {
13-
this.config = new Config({
12+
this.config = {
1413
accountID: credentials.AccountID,
1514
accessKeyId: credentials.AccessKeyID,
1615
accessKeySecret: credentials.AccessKeySecret,
1716
securityToken: credentials.SecurityToken,
1817
endpoint: ossEndpoint,
1918
regionId: region,
2019
timeout: process.env.OSS_CLIENT_TIMEOUT || 60000,
21-
});
22-
this.client = new Oss();
20+
};
21+
this.client = new Oss(logger);
2322
}
2423

2524
async deploy(ossMountConfig = 'auto'): Promise<{ ossBucket: string }> {

0 commit comments

Comments
 (0)