docker: adjust caching

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

View File

@ -22,7 +22,6 @@ RUN /venv/bin/pip install torch --index-url https://download.pytorch.org/whl/cu1
WORKDIR /local-llm-server WORKDIR /local-llm-server
# We don't need to rebuild VLLM every time we build the container. But if we need # We don't need to rebuild VLLM every time we build the container. But if we need
# to, uncomment the following line. # 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
@ -48,16 +47,16 @@ RUN sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/
# Disable password SSH login # Disable password SSH login
RUN sed -i 's/#PasswordAuthentication yes/PasswordAuthentication no/' /etc/ssh/sshd_config RUN sed -i 's/#PasswordAuthentication yes/PasswordAuthentication no/' /etc/ssh/sshd_config
# Create the necessary directory for SSH # Create the necessary directory for sshd
RUN mkdir /var/run/sshd RUN mkdir /var/run/sshd
ADD "https://www.random.org/cgi-bin/randbyte?nbytes=10&format=h" skipcache
COPY --from=build /local-llm-server /local-llm-server COPY --from=build /local-llm-server /local-llm-server
COPY --from=build /venv /venv 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
ADD "https://www.random.org/cgi-bin/randbyte?nbytes=10&format=h" skipcache
COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf
COPY start-vllm.sh /app/start-vllm.sh COPY start-vllm.sh /app/start-vllm.sh
COPY start-container.sh /app/start.sh COPY start-container.sh /app/start.sh
@ -71,6 +70,8 @@ RUN git config --global --add safe.directory /local-llm-server
RUN chmod +x /app/start.sh RUN chmod +x /app/start.sh
RUN rm skipcache
ENV SHELL="/bin/bash" ENV SHELL="/bin/bash"
# SSH # SSH