45 lines
1.6 KiB
Docker
45 lines
1.6 KiB
Docker
|
FROM nvidia/cuda:11.8.0-devel-ubuntu22.04 as build
|
||
|
|
||
|
RUN apt-get update && apt-get install -y git python3-pip python3-venv wget unzip && rm -rf /var/lib/apt/lists/*
|
||
|
|
||
|
RUN git clone https://git.evulid.cc/cyberes/local-llm-server.git /local-llm-server
|
||
|
|
||
|
WORKDIR /local-llm-server
|
||
|
|
||
|
RUN python3 -m venv /venv
|
||
|
RUN /venv/bin/pip install -r requirements.txt
|
||
|
RUN /venv/bin/pip install git+https://github.com/vllm-project/vllm
|
||
|
|
||
|
ADD "https://www.random.org/cgi-bin/randbyte?nbytes=10&format=h" skipcache
|
||
|
|
||
|
RUN git fetch; git reset --hard origin/master
|
||
|
|
||
|
RUN mkdir -p /app
|
||
|
COPY ./rathole-client.toml /app/client.toml
|
||
|
RUN wget https://github.com/rapiz1/rathole/releases/download/v0.4.8/rathole-x86_64-unknown-linux-gnu.zip -O /tmp/rathole.zip
|
||
|
RUN unzip -j /tmp/rathole.zip -d /tmp
|
||
|
RUN rm /tmp/rathole.zip
|
||
|
RUN cp /tmp/rathole /app
|
||
|
|
||
|
FROM nvidia/cuda:11.8.0-base-ubuntu22.04 as runtime
|
||
|
|
||
|
RUN apt-get update && apt-get install -y supervisor && rm -rf /var/lib/apt/lists/*
|
||
|
|
||
|
COPY --from=build /local-llm-server /local-llm-server
|
||
|
COPY --from=build /venv /venv
|
||
|
COPY --from=build /app /app
|
||
|
RUN cp /local-llm-server/other/vllm/Docker/supervisord.conf /etc/supervisor/conf.d/supervisord.conf
|
||
|
|
||
|
RUN useradd -ms /bin/bash apiserver
|
||
|
RUN chown -R apiserver:apiserver /local-llm-server
|
||
|
|
||
|
RUN apt-get update && apt-get install -y python3 python3-pip wget aria2
|
||
|
RUN pip3 install --upgrade pip setuptools wheel
|
||
|
RUN pip install jupyterlab
|
||
|
|
||
|
EXPOSE 7000
|
||
|
EXPOSE 8888 # jupyter
|
||
|
CMD ["bash", "-c", "source /etc/bash.bashrc && /usr/bin/supervisord"]
|
||
|
|
||
|
# To test your config, uncomment this and comment out the other CMD.
|
||
|
#CMD ["/app/rathole", "-c", "/app/client.toml"]
|