docker: fix??

This commit is contained in:
Cyberes 2023-10-15 12:12:01 -06:00
parent d4b6d7ef82
commit 5df955dae0
4 changed files with 13 additions and 11 deletions

View File

@ -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/

View File

@ -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 .`
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`.

View File

@ -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

View File

@ -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'