mirror of
https://github.com/PaddlePaddle/FastDeploy.git
synced 2025-12-24 13:28:13 +08:00
[ENV] support AK SK ENCPOINT while get the multi_modal's feature (#5159)
This commit is contained in:
@@ -153,8 +153,12 @@ environment_variables: dict[str, Callable[[], Any]] = {
|
||||
"FD_MODEL_USE_SAFETENSORS": lambda: int(os.getenv("FD_MODEL_USE_SAFETENSORS", "1")) == 1,
|
||||
"FD_MODEL_USE_OFFLINE_QUANT": lambda: int(os.getenv("FD_MODEL_USE_OFFLINE_QUANT", "1")) == 1,
|
||||
"FD_MOE_QUANT_TYPE": lambda: os.getenv("FD_MOE_QUANT_TYPE", "w4a8"),
|
||||
# The AK of bos storing the features while multi_modal infer
|
||||
"ENCODE_FEATURE_BOS_AK": lambda: os.getenv("ENCODE_FEATURE_BOS_AK"),
|
||||
# The SK of bos storing the features while multi_modal infer
|
||||
"ENCODE_FEATURE_BOS_SK": lambda: os.getenv("ENCODE_FEATURE_BOS_SK"),
|
||||
# The ENDPOINT of bos storing the features while multi_modal infer
|
||||
"ENCODE_FEATURE_ENDPOINT": lambda: os.getenv("ENCODE_FEATURE_ENDPOINT"),
|
||||
# Enable offline perf test mode for PD disaggregation
|
||||
"FD_OFFLINE_PERF_TEST_FOR_PD": lambda: int(os.getenv("FD_OFFLINE_PERF_TEST_FOR_PD", "0")),
|
||||
"FD_ENABLE_E2W_TENSOR_CONVERT": lambda: int(os.getenv("FD_ENABLE_E2W_TENSOR_CONVERT", "0")),
|
||||
|
||||
@@ -972,7 +972,8 @@ def init_bos_client():
|
||||
from baidubce.services.bos.bos_client import BosClient
|
||||
|
||||
cfg = BceClientConfiguration(
|
||||
credentials=BceCredentials(envs.ENCODE_FEATURE_BOS_AK, envs.ENCODE_FEATURE_BOS_SK), endpoint="bj.bcebos.com"
|
||||
credentials=BceCredentials(envs.ENCODE_FEATURE_BOS_AK, envs.ENCODE_FEATURE_BOS_SK),
|
||||
endpoint=envs.ENCODE_FEATURE_ENDPOINT,
|
||||
)
|
||||
return BosClient(cfg)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user