Skip to content

Commit

Permalink
Elfsims upgrade (#66)
Browse files Browse the repository at this point in the history
* Updates infra for elfsims upgrade

* Adding new containers to test ci

* Bumping elfsims tag

* Adding streamlit arguments to allow for running in container

* Fix test workflow

* Update .github/workflows/test.yml

* Update .github/workflows/test.yml

---------

Co-authored-by: Ryan Goree <[email protected]>
  • Loading branch information
Sheng Lundquist and ryangoree authored Aug 16, 2023
1 parent 02bd506 commit 90a4718
Show file tree
Hide file tree
Showing 6 changed files with 45 additions and 6 deletions.
20 changes: 18 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ jobs:
# Build fresh infra images if this PR includes changes to the
# /services directory.
SERVICES_CHANGED=$(git diff --name-only ${{ github.event.pull_request.base.sha }} ${{ github.event.pull_request.head.sha }} | grep -m 1 "^services/")
FILES_CHANGED=$(git diff --name-only ${{ github.event.pull_request.base.sha }} ${{ github.event.pull_request.head.sha }})
if [ -n "$SERVICES_CHANGED" ]; then
if echo "$FILES_CHANGED" | grep -m 1 "^services/"; then
docker build services/artifacts -t ghcr.io/${{ github.repository }}/artifacts:${{ github.sha }}
docker build services/fund-accounts -t ghcr.io/${{ github.repository }}/fund-accounts:${{ github.sha }}
export INFRA_TAG=${{ github.sha }}
Expand Down Expand Up @@ -103,6 +103,22 @@ jobs:
exit 1
fi
# The username reg service should be running.
- name: Check username-reg service
run: |
if [ -z "$(docker compose ps -q username-reg)" ]; then
echo "Username reg service exited unexpectedly"
exit 1
fi
# The dashboard service should be running.
- name: Check dashboard service
run: |
if [ -z "$(docker compose ps -q dashboard)" ]; then
echo "Dashboard service exited unexpectedly"
exit 1
fi
# The db service should be running.
- name: Check db service
run: |
Expand Down
22 changes: 20 additions & 2 deletions docker-compose.data.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ services:
profiles:
- "data"
working_dir: /app/
command: /bin/sh -c "python elfpy/data/acquire_data.py"
command: /bin/sh -c "python lib/chainsync/bin/acquire_data.py"
# This file sets postgres information
env_file:
- .env
Expand All @@ -20,10 +20,28 @@ services:
profiles:
- "data"
working_dir: /app/
command: /bin/sh -c "python elfpy/data/register_username_server.py"
command: /bin/sh -c "python lib/chainsync/bin/register_username_server.py"
# This file sets postgres information
env_file:
- .env

dashboard:
image: ghcr.io/delvtech/elf-simulations/elf-simulations:${ELFPY_TAG}
profiles:
- "data"
working_dir: /app/
command: /bin/sh -c "streamlit run lib/chainsync/bin/run_hyperdrive_dashboard.py \
--server.port=8501 --server.headless true\
--server.fileWatcherType=none --browser.gatherUsageStats=false"
# This file sets postgres information
env_file:
- .env
environment:
# TODO these should eventually be removed in favor of seperate process writing
# pnl to database
- ARTIFACTS_URL=${ARTIFACTS_URL}
- RPC_URL=${RPC_URL}


volumes:
artifacts:
2 changes: 1 addition & 1 deletion docker-compose.devnet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ services:
depends_on:
- ethereum
command: |
/bin/sh -c "sleep 1; ARTIFACTS_URL=${ARTIFACTS_URL} RPC_URL=${RPC_URL} python elfpy/bots/checkpoint_bot.py"
/bin/sh -c "sleep 1; ARTIFACTS_URL=${ARTIFACTS_URL} RPC_URL=${RPC_URL} python lib/agent0/bin/checkpoint_bot.py"
volumes:
artifacts:
4 changes: 4 additions & 0 deletions docker-compose.ports.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ services:
ports:
- ${USERNAME_REGISTER_PORT}:5002

dashboard:
ports:
- ${DASHBOARD_PORT}:8501

db:
ports:
- ${DB_PORT}:5432
1 change: 1 addition & 0 deletions env/env.ports
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ ARTIFACT_PORT=8080
UI_PORT=5173
USERNAME_REGISTER_PORT=5002
DB_PORT=5432
DASHBOARD_PORT=5172
2 changes: 1 addition & 1 deletion env/env.tags
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ HYPERDRIVE_TAG=0.0.11
INFRA_TAG=0.0.4

# Elfpy (bots)
ELFPY_TAG=0.3.2
ELFPY_TAG=0.4.1

# hyperdrive-monorepo (frontend)
HYPERDRIVE_MONOREPO_TAG=0.5.0

0 comments on commit 90a4718

Please sign in to comment.