log params

This commit is contained in:
Dobromir Popov
2023-09-02 21:48:43 +00:00
parent d36c9a6287
commit a352872b72

View File

@ -42,8 +42,7 @@ if [ "$MODE" = "monitor" ] && [ -n "$DHT_PEERS" ]; then\n\
##
echo "monitoring PRIVATE swarm. Initial F peers set to $FORMATTED_PEERS"\n\
echo "monitoring PRIVATE swarm. Initial peers set to $DHT_PEERS"\n\
echo "monitoring PRIVATE swarm. Initial peers array set to [$DHT_PEERS]"\n\
echo "monitoring PRIVATE swarm. Initial peers array set to [$DHT_PEERS]"\n\
echo "INITIAL_PEERS = [$DHT_PEERS]" >> /health.petals.dev/config.py\n\
echo "FORMATTED_PEERS = $FORMATTED_PEERS" >> /health.petals.dev/config.py\n\
else \n\
@ -79,18 +78,22 @@ if [ -n "$DHT_PEERS" ]; then\n\
fi\n\
case "$MODE" in\n\
"monitor")\n\
echo "Running monitor node with params: $ENV_PARAMS\n\
cd /health.petals.dev\n\
exec gunicorn app:app --bind 0.0.0.0:8484 --workers 4 --threads 10 $ENV_PARAMS \n\
;;\n\
"chat")\n\
echo "Running chat node with params: $ENV_PARAMS\n\
cd /chat.petals.dev\n\
exec gunicorn app:app --bind 0.0.0.0:8484 --workers 4 --threads 10 $ENV_PARAMS \n\
;;\n\
"dht")\n\
echo "Running DHT node with ID $ID_PATH"\n\
echo "Running DHT node with params: --host_maddrs /ip4/0.0.0.0/tcp/31337 --identity_path $ID_PATH $INITIAL_PEERS_ARG $ENV_PARAMS"\n\
exec python -m petals.cli.run_dht --host_maddrs /ip4/0.0.0.0/tcp/31337 --identity_path $ID_PATH $INITIAL_PEERS_ARG $ENV_PARAMS \n\
;;\n\
"server" | *)\n\
echo "Running server node with params: $ENV_PARAMS $MODEL_NAME $INITIAL_PEERS_ARG"\n\
exec python -m petals.cli.run_server $ENV_PARAMS $MODEL_NAME $INITIAL_PEERS_ARG\n\
;;\n\
esac' > /entrypoint.sh && chmod +x /entrypoint.sh