docker: fix??
This commit is contained in:
parent
d4b6d7ef82
commit
5df955dae0
|
@ -22,12 +22,11 @@ RUN /venv/bin/pip install torch --index-url https://download.pytorch.org/whl/cu1
|
||||||
|
|
||||||
WORKDIR /local-llm-server
|
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
|
# 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 /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
|
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 /app /app
|
||||||
COPY --from=build /jupyterlab /jupyterlab
|
COPY --from=build /jupyterlab /jupyterlab
|
||||||
|
|
||||||
RUN cp /local-llm-server/other/vllm/Docker/supervisord.conf /etc/supervisor/conf.d/supervisord.conf
|
COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf
|
||||||
RUN cp /local-llm-server/other/vllm/Docker/start-vllm.sh /app/start-vllm.sh
|
COPY start-vllm.sh /app/start-vllm.sh
|
||||||
RUN cp /local-llm-server/other/vllm/Docker/start-container.sh /app/start.sh
|
COPY start-container.sh /app/start.sh
|
||||||
|
|
||||||
RUN mkdir -p /var/log/app/
|
RUN mkdir -p /var/log/app/
|
||||||
|
|
||||||
|
|
|
@ -27,7 +27,8 @@
|
||||||
|
|
||||||
### Building
|
### 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).
|
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 .`
|
2. `sudo docker build .`
|
||||||
|
If you want to build the latest VLLM, add `--no-cache`.
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
echo "LAUNCHING CONTAINER..."
|
echo "LAUNCHING CONTAINER..."
|
||||||
|
|
||||||
|
# Update the container repository and make sure pip dependancies are up to date.
|
||||||
cd /local-llm-server || exit
|
cd /local-llm-server || exit
|
||||||
git fetch
|
git fetch
|
||||||
git reset --hard origin/master
|
git reset --hard origin/master
|
||||||
|
@ -24,4 +25,4 @@ fi
|
||||||
cp /local-llm-server/other/vllm/Docker/idle.ipynb /notebooks/idle.ipynb
|
cp /local-llm-server/other/vllm/Docker/idle.ipynb /notebooks/idle.ipynb
|
||||||
|
|
||||||
# Start the services
|
# Start the services
|
||||||
/usr/bin/supervisord
|
/usr/bin/supervisord -c /etc/supervisor/conf.d/supervisord.conf
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
[supervisord]
|
[supervisord]
|
||||||
nodaemon=true
|
nodaemon=true
|
||||||
|
user=root
|
||||||
|
|
||||||
[program:vllm]
|
[program:vllm]
|
||||||
command=/bin/bash -c 'bash /app/start-vllm.sh 2>&1 | tee -a /var/log/app/vllm.log'
|
command=/bin/bash -c 'bash /app/start-vllm.sh 2>&1 | tee -a /var/log/app/vllm.log'
|
||||||
|
|
Reference in New Issue