diff --git a/docker/images.petals-ai.dockerfile b/docker/images.petals-ai.dockerfile index dddfc9c..b1709b0 100644 --- a/docker/images.petals-ai.dockerfile +++ b/docker/images.petals-ai.dockerfile @@ -14,9 +14,13 @@ ENV MODEL_NAME=stabilityai/StableBeluga2 ENV HF_TOKEN= ENV DHT_PEERS= ENV ENV_PARAMS= +ENV ID_PATH=\dht\bootstrap1.id # pull petals and bake it into the image. comment for lite image RUN git clone https://github.com/d-popov/health.petals.dev.git && cd /health.petals.dev && pip install -r requirements.txt +RUN git clone https://github.com/d-popov/chat.petals.dev.git && cd /chat.petals.dev && pip install -r requirements.txt +RUN pip install git+https://github.com/d-popov/petals-ai.git +RUN pip install git+https://github.com/learning-at-home/hivemind # FORMATTED_PEERS=$$(echo $$DHT_PEERS | sed "s/[^ ]\+/\'&\'/g")\n\ # FORMATTED_PEERS=$$(echo $$DHT_PEERS | sed "s/[^ ]\\+/\\'&\\'/g")\n\ @@ -51,15 +55,15 @@ if [ ! -f "/initialized" ]; then\n\ pip install --upgrade petals\n\ case "$MODE" in\n\ "monitor")\n\ - # git clone https://github.com/d-popov/health.petals.dev.git && \ - # cd /health.petals.dev && pip install -r requirements.txt\n\ + git clone https://github.com/d-popov/health.petals.dev.git && \ + cd /health.petals.dev && pip install -r requirements.txt\n\ ;;\n\ "chat")\n\ - git clone https://github.com/petals-infra/chat.petals.dev.git && \ + git clone https://github.com/d-popov/chat.petals.dev.git&& \ cd /chat.petals.dev && pip install -r requirements.txt\n\ ;;\n\ "server" | "dht")\n\ - pip install git+https://github.com/bigscience-workshop/petals\n\ + pip install git+https://github.com/d-popov/petals-ai.git\n\ ;;\n\ esac\n\ fi\n\ @@ -76,14 +80,15 @@ fi\n\ case "$MODE" in\n\ "monitor")\n\ cd /health.petals.dev\n\ - exec gunicorn app:app --bind 0.0.0.0:8484 --workers 4 --threads 10\n\ + exec gunicorn app:app --bind 0.0.0.0:8484 --workers 4 --threads 10 $ENV_PARAMS \n\ ;;\n\ "chat")\n\ cd /chat.petals.dev\n\ - exec gunicorn app:app --bind 0.0.0.0:8484 --workers 4 --threads 10\n\ + exec gunicorn app:app --bind 0.0.0.0:8484 --workers 4 --threads 10 $ENV_PARAMS \n\ ;;\n\ "dht")\n\ - exec python -m petals.cli.run_dht --host_maddrs /ip4/0.0.0.0/tcp/31337 --identity_path bootstrap1.id $INITIAL_PEERS_ARG\n\ + echo "Running DHT node with ID $ID_PATH"\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\ exec python -m petals.cli.run_server $ENV_PARAMS $MODEL_NAME $INITIAL_PEERS_ARG\n\