-
Notifications
You must be signed in to change notification settings - Fork 4
/
run_service.sh
executable file
·49 lines (38 loc) · 1.32 KB
/
run_service.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#!/usr/bin/env bash
# Define environment variables
export ETHEREUM_LEDGER_RPC=INSERT_YOUR_RPC
export ETHEREUM_LEDGER_CHAIN_ID=100
export ALL_PARTICIPANTS='["YOUR_AGENT_ADDRESS"]'
export SAFE_CONTRACT_ADDRESS="YOUR_SAFE_ADDRESS"
export NEWSAPI_ENDPOINT=https://newsapi.org/v2/top-headlines
export NEWSAPI_API_KEY=YOUR_NEWSAPI_API_KEY
export OPENAI_API_KEY=YOUR_OPENAI_API_KEY
export ENGINE="gpt-4"
export MARKET_APPROVAL_SERVER_URL=YOUR_MARKET_APPROVAL_SERVER_URL
export MARKET_APPROVAL_SERVER_API_KEY=YOUR_MARKET_APPROVAL_SERVER_API_KEY
export MAX_PROPOSED_MARKETS=-1
export MIN_MARKET_PROPOSAL_INTERVAL_SECONDS=1800
export TOPICS='["business","science","technology","politics","arts","weather"]'
export MARKET_FEE=2
export INITIAL_FUNDS=1
export MARKET_TIMEOUT=1
export MARKET_IDENTIFICATION_PROMPT=$(sed -e ':a' -e 'N' -e '$!ba' \
-e 's/"/\\"/g' \
-e "s/'/\\\'/g" \
-e 's/:/;/g' \
-e 's/\n/\\n/g' \
market_identification_prompt.txt)
make clean
autonomy packages lock
autonomy push-all
# Fetch the service
autonomy fetch --local --service valory/market_maker && cd market_maker
# Build the image
autonomy build-image
# Copy keys and build the deployment
# MODIFY THIS PATH IF REQUIRED
cp ../keys.json ./keys.json
# Build the deployment
autonomy deploy build -ltm
# Run the deployment
autonomy deploy run --build-dir abci_build/