Skip to content

Commit

Permalink
feat: working deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
0xArdi committed Nov 20, 2024
1 parent 939415b commit 638c4ce
Show file tree
Hide file tree
Showing 6 changed files with 487 additions and 503 deletions.
8 changes: 4 additions & 4 deletions .api_keys.json.example
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"openai": [
"Your #1 OpenAI API key here",
"Your #2 OpenAI API key here"
"YOUR_#1_KEY_HERE",
"YOUR_#2_KEY_HERE"
],
"google_api_key": [
"Your #1 Google API key here",
"Your #2 Google API key here"
"YOUR_#1_KEY_HERE",
"YOUR_#2_KEY_HERE"
]
}
27 changes: 14 additions & 13 deletions operate/services/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -471,19 +471,20 @@ def _build_docker(
(build / volume).mkdir(exist_ok=True)
_volumes.append(f"./{volume}:{mount}:Z")

for node in deployment["services"]:
if "abci" in node:
deployment["services"][node]["volumes"].extend(_volumes)
if (
"SKILL_TRADER_ABCI_MODELS_PARAMS_ARGS_MECH_REQUEST_PRICE=0"
in deployment["services"][node]["environment"]
):
deployment["services"][node]["environment"].remove(
"SKILL_TRADER_ABCI_MODELS_PARAMS_ARGS_MECH_REQUEST_PRICE=0"
)
deployment["services"][node]["environment"].append(
"SKILL_TRADER_ABCI_MODELS_PARAMS_ARGS_MECH_REQUEST_PRICE=10000000000000000"
)
# not needed and causes issues
# for node in deployment["services"]:
# if "abci" in node:
# deployment["services"][node]["volumes"].extend(_volumes)
# if (
# "SKILL_TRADER_ABCI_MODELS_PARAMS_ARGS_MECH_REQUEST_PRICE=0"
# in deployment["services"][node]["environment"]
# ):
# deployment["services"][node]["environment"].remove(
# "SKILL_TRADER_ABCI_MODELS_PARAMS_ARGS_MECH_REQUEST_PRICE=0"
# )
# deployment["services"][node]["environment"].append(
# "SKILL_TRADER_ABCI_MODELS_PARAMS_ARGS_MECH_REQUEST_PRICE=10000000000000000"
# )

with (build / DOCKER_COMPOSE_YAML).open("w", encoding="utf-8") as stream:
yaml_dump(data=deployment, stream=stream)
Expand Down
Loading

0 comments on commit 638c4ce

Please sign in to comment.