Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

set default path variables #18

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
74 changes: 74 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,80 @@

The Triton repository agent that downloads model via dragonfly.



# Example

### 1.拉取镜像:

docker pull dragonflyoss/dragonfly-repository-agent:latest


### 2.设置配置文件:
2.1:在config.pbtxt远程模型仓库配置文件中添加以下字段:

model_repository_agents{

agents [
{
name: "dragonfly",
}
]
}

2.2:在cloud_credential.json文件中添加认证信息:

{
"s3": {
"": {
"secret_key":"",
"key_id":"",
"region": "",
"session_token":"",
"profile": ""
}
} //s3认证信息
"gs":{}
"as":{}
}

2.3:在dragonfly_config.json文件中添加认证信息:

{
"proxy": "http://127.0.0.1:65001", // Dragonfly 的地址
"header": {},
"filter": [
"X-Amz-Algorithm",
"X-Amz-Credential&X-Amz-Date",
"X-Amz-Expires",
"X-Amz-SignedHeaders",
"X-Amz-Signature"]
}

### 3.执行命令:

sudo docker run -it --network host -v {配置文件路径}:/home/triton/ -e TRITON_DRAGONFLY_CONFIG_PATH=/home/triton/dragonfly_config.json -e TRITON_CLOUD_CREDENTIAL_PATH=/home/triton/cloud_credential.json dragonflyoss/dragonfly-repository-agent tritonserver --model-repository=s3://{ip}/models --exit-on-error=false

### 4.查看输出结果:

I1213 12:27:11.166347 1 server.cc:604]
+------------------+------------------------------------------------------------------------+
| Repository Agent | Path |
+------------------+------------------------------------------------------------------------+
| dragonfly | /opt/tritonserver/repoagents/dragonfly/libtritonrepoagent_dragonfly.so |
+------------------+------------------------------------------------------------------------+

+--------+---------+--------+
| Model | Version | Status |
+--------+---------+--------+
| simple | 1 | READY |
+--------+---------+--------+






## Documentation

You can find the full documentation on the [d7y.io](https://d7y.io).
Expand Down
4 changes: 4 additions & 0 deletions src/dragonfly.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ TRITONREPOAGENT_ModelAction(
if (file_path_c_str != nullptr) {
// Load from credential file
cred_path = std::string(file_path_c_str);
} else {
cred_path="/home/triton/cloud_credential.json" ;
}

const char* config_path_c_str =
Expand All @@ -51,6 +53,8 @@ TRITONREPOAGENT_ModelAction(
if (config_path_c_str != nullptr) {
// Load from config file
config_path = std::string(config_path_c_str);
} else {
config_path="/home/triton/dragonfly_config.json" ;
}

const char* temp_dir_cstr = nullptr;
Expand Down
Loading