From 89e9f426631c80fd5adc52fae05d0cac9f49fb29 Mon Sep 17 00:00:00 2001 From: Cyberes Date: Thu, 28 Sep 2023 17:02:45 -0600 Subject: [PATCH] remove secrets from dockerfile, use /storage instead --- other/vllm/Docker/Dockerfile | 4 +--- other/vllm/Docker/start-container.sh | 8 +++++++- other/vllm/Docker/start-vllm.sh | 5 +++++ other/vllm/Docker/supervisord.conf | 5 +++-- 4 files changed, 16 insertions(+), 6 deletions(-) diff --git a/other/vllm/Docker/Dockerfile b/other/vllm/Docker/Dockerfile index 7160a55..d3c02e8 100644 --- a/other/vllm/Docker/Dockerfile +++ b/other/vllm/Docker/Dockerfile @@ -63,9 +63,7 @@ RUN cp /local-llm-server/other/vllm/Docker/start-vllm.sh /app/start-vllm.sh RUN cp /local-llm-server/other/vllm/Docker/start-container.sh /app/start.sh # Copy your secrets in -COPY ./rathole-client.toml /app/client.toml -COPY ./jupyter /app/jupyter -COPY ./ssh /root/.ssh +# COPY ./jupyter /app/jupyter RUN mkdir -p /var/log/app/ diff --git a/other/vllm/Docker/start-container.sh b/other/vllm/Docker/start-container.sh index fb7e9f2..0b98702 100644 --- a/other/vllm/Docker/start-container.sh +++ b/other/vllm/Docker/start-container.sh @@ -3,5 +3,11 @@ mkdir -p /storage/vllm/ chown -R apiserver:apiserver /storage/vllm touch /storage/vllm/cmd.txt +touch /storage/vllm/rathole-client.toml -/usr/bin/supervisord \ No newline at end of file +if [ -f /storage/vllm/ssh ]; then + cp -r /storage/vllm/ssh /root/.ssh + echo "Copied ssh from /storage" +fi + +/usr/bin/supervisord diff --git a/other/vllm/Docker/start-vllm.sh b/other/vllm/Docker/start-vllm.sh index 209e90a..906bc30 100644 --- a/other/vllm/Docker/start-vllm.sh +++ b/other/vllm/Docker/start-vllm.sh @@ -6,4 +6,9 @@ for pid in $vllm_pid; do kill -9 $pid done +cd /local-llm-server +git fetch +git reset --hard origin/master +/venv/bin/pip install -r requirements.txt + /venv/bin/python /local-llm-server/other/vllm/vllm_api_server.py --host 0.0.0.0 --port 7000 --max-log-len 100 $(cat /storage/vllm/cmd.txt) diff --git a/other/vllm/Docker/supervisord.conf b/other/vllm/Docker/supervisord.conf index 904645a..9361bdb 100644 --- a/other/vllm/Docker/supervisord.conf +++ b/other/vllm/Docker/supervisord.conf @@ -13,7 +13,7 @@ user=apiserver environment=HOME="/home/apiserver",USER="apiserver" [program:rathole] -command=/bin/bash -c '/app/rathole -c /app/client.toml 2>&1 | tee -a /var/log/app/rathole.log' +command=/bin/bash -c '/app/rathole -c /storage/vllm/rathole-client.toml 2>&1 | tee -a /var/log/app/rathole.log' autostart=true autorestart=true stdout_logfile=/dev/fd/1 @@ -25,7 +25,8 @@ environment=HOME="/home/apiserver",USER="apiserver" [program:jupyter] command=/jupyterlab/bin/jupyter lab --allow-root --ip=0.0.0.0 --no-browser --ServerApp.trust_xheaders=True --ServerApp.disable_check_xsrf=False --ServerApp.allow_remote_access=True --ServerApp.allow_origin='*' --ServerApp.allow_credentials=True -environment=JUPYTER_CONFIG_DIR="/app/jupyter",SHELL="/bin/bash" +environment=SHELL="/bin/bash" +; JUPYTER_CONFIG_DIR="/app/jupyter" [program:ssh] command=/usr/sbin/sshd -D