From 5df955dae0612fc1b285c921131518eb81e60399 Mon Sep 17 00:00:00 2001 From: Cyberes Date: Sun, 15 Oct 2023 12:12:01 -0600 Subject: [PATCH] docker: fix?? --- other/vllm/Docker/Dockerfile | 13 ++++++------- other/vllm/Docker/README.md | 7 ++++--- other/vllm/Docker/start-container.sh | 3 ++- other/vllm/Docker/supervisord.conf | 1 + 4 files changed, 13 insertions(+), 11 deletions(-) diff --git a/other/vllm/Docker/Dockerfile b/other/vllm/Docker/Dockerfile index ca210d9..9dfd60b 100644 --- a/other/vllm/Docker/Dockerfile +++ b/other/vllm/Docker/Dockerfile @@ -22,12 +22,11 @@ RUN /venv/bin/pip install torch --index-url https://download.pytorch.org/whl/cu1 WORKDIR /local-llm-server -# The local local-llm-server repo may be cached, so we will fetch and reset to the remote every time. -# Also, make sure there weren't any pip deps added. + +# We don't need to rebuild VLLM every time we build the container. But if we need +# to, uncomment the following line. # ADD "https://www.random.org/cgi-bin/randbyte?nbytes=10&format=h" skipcache RUN /venv/bin/pip install git+https://github.com/vllm-project/vllm -RUN git fetch; git reset --hard origin/master -RUN /venv/bin/pip install -r requirements.txt FROM nvidia/cuda:11.8.0-base-ubuntu22.04 as runtime @@ -59,9 +58,9 @@ COPY --from=build /venv /venv COPY --from=build /app /app COPY --from=build /jupyterlab /jupyterlab -RUN cp /local-llm-server/other/vllm/Docker/supervisord.conf /etc/supervisor/conf.d/supervisord.conf -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 supervisord.conf /etc/supervisor/conf.d/supervisord.conf +COPY start-vllm.sh /app/start-vllm.sh +COPY start-container.sh /app/start.sh RUN mkdir -p /var/log/app/ diff --git a/other/vllm/Docker/README.md b/other/vllm/Docker/README.md index 3713b18..8468160 100644 --- a/other/vllm/Docker/README.md +++ b/other/vllm/Docker/README.md @@ -27,7 +27,8 @@ ### Building -You **must** have a GPU attached to your system when building the container. +You **must** have a GPU attached to your system when building the container (required for building VLLM). -1. Install the [NVIDIA Container Toolkit](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-guide.html). -2. `sudo docker build .` \ No newline at end of file +1. Install the [NVIDIA Container Toolkit](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-guide.html) and CUDA 11.8. +2. `sudo docker build .` + If you want to build the latest VLLM, add `--no-cache`. diff --git a/other/vllm/Docker/start-container.sh b/other/vllm/Docker/start-container.sh index 2ad4d19..fa3d2ca 100644 --- a/other/vllm/Docker/start-container.sh +++ b/other/vllm/Docker/start-container.sh @@ -2,6 +2,7 @@ echo "LAUNCHING CONTAINER..." +# Update the container repository and make sure pip dependancies are up to date. cd /local-llm-server || exit git fetch git reset --hard origin/master @@ -24,4 +25,4 @@ fi cp /local-llm-server/other/vllm/Docker/idle.ipynb /notebooks/idle.ipynb # Start the services -/usr/bin/supervisord +/usr/bin/supervisord -c /etc/supervisor/conf.d/supervisord.conf diff --git a/other/vllm/Docker/supervisord.conf b/other/vllm/Docker/supervisord.conf index c37979e..2289e80 100644 --- a/other/vllm/Docker/supervisord.conf +++ b/other/vllm/Docker/supervisord.conf @@ -1,5 +1,6 @@ [supervisord] nodaemon=true +user=root [program:vllm] command=/bin/bash -c 'bash /app/start-vllm.sh 2>&1 | tee -a /var/log/app/vllm.log'