diff --git a/docker/images.petals-ai.dockerfile b/docker/images.petals-ai.dockerfile deleted file mode 100644 index 3c6112f..0000000 --- a/docker/images.petals-ai.dockerfile +++ /dev/null @@ -1,105 +0,0 @@ -# dobromirpopov/petals-ai :latest full -# dobromirpopov/petals-ai:full - -FROM python:slim - -# System dependencies -RUN apt-get update && apt-get install -y git && apt-get clean && rm -rf /var/lib/apt/lists/* - -# Upgrade pip -RUN pip install --upgrade pip - -# Add ENV for MODEL and HF_TOKEN -ENV MODEL_NAME=stabilityai/StableBeluga2 -ENV HF_TOKEN= -ENV DHT_PEERS= -ENV ENV_PARAMS= -ENV ID_PATH=\dht\bootstrap1.id - -# FORMATTED_PEERS=$$(echo $$DHT_PEERS | sed "s/[^ ]\+/\'&\'/g")\n\ -# FORMATTED_PEERS=$$(echo $$DHT_PEERS | sed "s/[^ ]\\+/\\'&\\'/g")\n\ - -# Create the entrypoint script inside the Dockerfile -RUN echo '#!/bin/sh\n\ -echo "Script is starting..."\n\ -echo "MODE is set to: $MODE"\n\ -if [ "$MODE" = "monitor" ] && [ -n "$DHT_PEERS" ]; then\n\ - echo "DHT_PEERS is set to: $DHT_PEERS"\n\ - FORMATTED_PEERS=[$DHT_PEERS]\n\ - echo "Debug FORMATTED_PEERS: $FORMATTED_PEERS"\n\ -## -# # Convert space-separated string to comma-separated string\n\ -# TEMP_PEERS=$(echo $DHT_PEERS | tr " " ",")\n\ -# # Add single quotes around each element and make it Python list format\n\ -# FORMATTED_PEERS=$(echo $TEMP_PEERS | sed "s/\\([^,]*\\)/\'\\1\'/g")\n\ -# FORMATTED_PEERS="[$FORMATTED_PEERS]"\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 "INITIAL_PEERS = [$DHT_PEERS]" >> /health.petals.dev/config.py\n\ - echo "FORMATTED_PEERS = $FORMATTED_PEERS" >> /health.petals.dev/config.py\n\ -else \n\ - echo "monitor has no DHT peers. Monitoring public swarm."\n\ -fi\n\ - -if [ ! -f "/initialized" ]; then\n\ - touch /initialized\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\ - ;;\n\ - "chat")\n\ - 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/d-popov/petals-ai.git\n\ - ;;\n\ - esac\n\ -fi\n\ - -if [ -n "$HF_TOKEN" ]; then\n\ - git config --global credential.helper store && \n\ - huggingface-cli login --token $HF_TOKEN --add-to-git-credential && \n\ - ENV_PARAMS="--use_auth_token $ENV_PARAMS"\n\ -fi\n\ -INITIAL_PEERS_ARG=""\n\ -if [ -n "$DHT_PEERS" ]; then\n\ - INITIAL_PEERS_ARG="--initial_peers $DHT_PEERS"\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 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 - -# pull petals and bake it into the image. comment for lite image -RUN pip install git+https://github.com/d-popov/petals-ai.git -RUN pip install git+https://github.com/learning-at-home/hivemind -RUN git clone https://github.com/d-popov/chat.petals.dev.git && cd /chat.petals.dev && pip install -r requirements.txt -RUN git clone https://github.com/d-popov/health.petals.dev.git && cd /health.petals.dev && pip install -r requirements.txt - -# if using separate entrypoint file: -# COPY entrypoint.sh /entrypoint.sh -# RUN chmod +x /entrypoint.sh TEST - -ENTRYPOINT ["/entrypoint.sh"] diff --git a/docker/py+npm.dockerfile b/docker/py+npm.dockerfile deleted file mode 100644 index d2ea963..0000000 --- a/docker/py+npm.dockerfile +++ /dev/null @@ -1,12 +0,0 @@ -# dobromirpopov/pynode -FROM python:slim - -## System dependencies and Node.js/npm installation -RUN apt-get update && apt-get install -y \ - git curl nodejs npm gnupg2 wget build-essential - -## Upgrade pip -RUN pip install --upgrade pip - -# Verify installations -RUN node --version && npm --version diff --git a/docker/pycudanode.dockerfile b/docker/pycudanode.dockerfile deleted file mode 100644 index 2da14f4..0000000 --- a/docker/pycudanode.dockerfile +++ /dev/null @@ -1,29 +0,0 @@ -# dobromirpopov/pycudanode - -FROM python:slim - -## System dependencies and Node.js/npm installation -RUN apt-get update && apt-get install -y \ - git curl nodejs npm gnupg2 wget build-essential - -## Add NVIDIA package repositories -RUN wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/cuda-repo-ubuntu1804_10.0.130-1_amd64.deb -RUN dpkg -i cuda-repo-ubuntu1804_10.0.130-1_amd64.deb -RUN apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/7fa2af80.pub -RUN apt-get update - -# Install CUDA and the accompanying libraries -RUN apt-get install -y cuda - -# Clean up -RUN apt-get clean && rm -rf /var/lib/apt/lists/* && rm -rf /cuda-repo-ubuntu1804_10.0.130-1_amd64.deb - -# Setting up CUDA environmental variables -ENV PATH /usr/local/nvidia/bin:/usr/local/cuda/bin:${PATH} -ENV LD_LIBRARY_PATH /usr/local/nvidia/lib:/usr/local/nvidia/lib64 - -## Upgrade pip -RUN pip install --upgrade pip - -# Verify installations -RUN node --version && npm --version \ No newline at end of file diff --git a/docker/toolLLM.dockerfile b/docker/toolLLM.dockerfile deleted file mode 100644 index c6ced39..0000000 --- a/docker/toolLLM.dockerfile +++ /dev/null @@ -1,27 +0,0 @@ -# https://github.com/OpenBMB/ToolBench - -from dobromirpopov/pynode - - -git clone https://github.com/d-popov/ToolBench.git -# git@github.com:OpenBMB/ToolBench.git -cd ToolBench -pip install -r requirements.txt - -# Backend server -RUN export PYTHONPATH=./ -python toolbench/inference/toolbench_server.py \ - --tool_root_dir data/toolenv/tools/ \ - --corpus_tsv_path data/retrieval/G1/corpus.tsv \ - --retrieval_model_path /path/to/your/retrival_model \ - --retrieved_api_nums 5 \ - --backbone_model toolllama \ - --model_path huggyllama/llama-7b \ - --lora \ - --lora_path /path/to/your/toolllama_lora \ - --max_observation_length 1024 \ - --method DFS_woFilter_w2 \ - --input_query_file data/instruction/inference_query_demo_open_domain.json \ - --output_answer_file data/answer/toolllama_lora_dfs_open_domain \ - --rapidapi_key 1c362306e9msh311d2dcf784fdc2p18be96jsncaebcf313a3f - diff --git a/windows/windows-setup.sh b/windows/windows-setup.sh new file mode 100644 index 0000000..c61161e --- /dev/null +++ b/windows/windows-setup.sh @@ -0,0 +1,8 @@ +# shell command to get the windows CD key +# (c) 2018 vbettag - wraper for powershell +# - requires powershell +# - requires admin rights +# shell command to get the windows CD key +# get the windows CD key +powershell -Command "(Get-WmiObject -query ‘select * from SoftwareLicensingService’).OA3xOriginalProductKey" +