This repository has been archived on 2024-10-27. You can view files and clone it, but cannot push or open issues or pull requests.
local-llm-server/other/vllm/Docker/Dockerfile

49 lines
1.4 KiB
Docker
Raw Normal View History

2023-10-15 15:38:48 -06:00
FROM cyberes/paperspace-vllm-base as runtime
2023-09-26 14:48:34 -06:00
2023-09-26 21:45:13 -06:00
RUN useradd -ms /bin/bash apiserver
RUN usermod -s /bin/bash root
2023-10-15 14:50:04 -06:00
# Required packages
2023-09-27 14:36:49 -06:00
RUN apt-get update && \
2023-10-15 15:45:25 -06:00
apt-get install -y python3 python3-pip supervisor && \
rm -rf /var/lib/apt/lists/*
2023-09-26 21:45:13 -06:00
RUN pip3 install --upgrade pip setuptools wheel
2023-10-15 14:50:04 -06:00
# Useful Python packages
2023-09-26 21:45:13 -06:00
RUN pip3 install glances
2023-10-15 14:50:04 -06:00
# Useful tools
2023-10-15 15:45:25 -06:00
RUN apt-get update && \
apt-get install -y wget aria2 git-lfs git openssh-server openssh-client nano tmux file && \
2023-10-15 14:50:04 -06:00
rm -rf /var/lib/apt/lists/*
2023-10-15 15:43:37 -06:00
RUN cd /local-llm-server && git reset --hard && git pull
2023-09-26 21:45:13 -06:00
# Enable root SSH login
RUN sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config
# Disable password SSH login
RUN sed -i 's/#PasswordAuthentication yes/PasswordAuthentication no/' /etc/ssh/sshd_config
2023-10-15 12:13:53 -06:00
# Create the necessary directory for sshd
2023-09-26 21:45:13 -06:00
RUN mkdir /var/run/sshd
2023-10-15 12:12:01 -06:00
COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf
COPY start-vllm.sh /app/start-vllm.sh
2023-10-15 15:38:48 -06:00
COPY init-container.sh /app/init.sh
2023-10-15 12:12:01 -06:00
COPY start-container.sh /app/start.sh
2023-09-26 14:48:34 -06:00
2023-09-27 14:59:33 -06:00
RUN mkdir -p /var/log/app/
2023-09-26 14:48:34 -06:00
2023-09-26 21:45:13 -06:00
RUN chown -R apiserver:apiserver /local-llm-server && \
2023-09-27 14:59:33 -06:00
chown -R apiserver:apiserver /app && \
chown -R apiserver:apiserver /var/log/app/
2023-09-29 22:28:38 -06:00
RUN git config --global --add safe.directory /local-llm-server
2023-09-26 14:48:34 -06:00
2023-09-27 16:12:36 -06:00
RUN chmod +x /app/start.sh
2023-09-26 21:45:13 -06:00
ENV SHELL="/bin/bash"
2023-10-15 15:43:37 -06:00
# Expose Jupyter. We don't need to expose VLLM or SSH since rathole will tunnel those.
2023-09-26 21:45:13 -06:00
EXPOSE 8888
2023-09-27 16:12:36 -06:00
CMD /app/start.sh