FROM cyberes/vllm-paperspace-base as runtime RUN useradd -ms /bin/bash apiserver RUN usermod -s /bin/bash root # Required packages RUN apt-get update && \ apt-get install -y python3 python3-pip supervisor && \ rm -rf /var/lib/apt/lists/* RUN pip3 install --upgrade pip setuptools wheel # Useful Python packages RUN pip3 install glances # Useful tools RUN apt-get update && \ apt-get install -y wget aria2 git-lfs git openssh-server openssh-client nano tmux file && \ rm -rf /var/lib/apt/lists/* # Update the git repo RUN cd /local-llm-server && git reset --hard && git pull # 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 no/PasswordAuthentication yes/' /etc/ssh/sshd_config # Create the necessary directory for sshd RUN mkdir /var/run/sshd COPY supervisord.conf /etc/supervisor/supervisord.conf COPY start-vllm.sh /app/start-vllm.sh COPY init-container.sh /app/init.sh COPY start-container.sh /app/start.sh RUN mkdir -p /var/log/app/ RUN chown -R apiserver:apiserver /local-llm-server && \ chown -R apiserver:apiserver /app && \ chown -R apiserver:apiserver /var/log/app/ RUN git config --global --add safe.directory /local-llm-server RUN chmod +x /app/init.sh RUN chmod +x /app/start.sh ENV SHELL="/bin/bash" # Expose Jupyter. We don't need to expose VLLM or SSH since rathole will tunnel those. EXPOSE 8888 CMD /app/start.sh