llama-rpc-server / Dockerfile
rgerganov's picture
update
1b58f4d
raw
history blame contribute delete
979 Bytes
ARG UBUNTU_VERSION=22.04
# This needs to generally match the container host's environment.
ARG CUDA_VERSION=12.6.0
# Target the CUDA runtime image
ARG BASE_CUDA_RUN_CONTAINER=nvidia/cuda:${CUDA_VERSION}-runtime-ubuntu${UBUNTU_VERSION}
FROM ${BASE_CUDA_RUN_CONTAINER} AS runtime
RUN apt-get update && \
apt-get install -y libgomp1 python3 bash git git-lfs wget curl procps htop vim nano net-tools iputils-ping netcat sudo && \
rm -rf /var/lib/apt/lists/*
# Set up a new user named "user" with user ID 1000
RUN useradd -m -u 1000 user && echo "user:pass" | chpasswd && adduser user sudo
# Switch to the "user" user
USER user
# Set home to the user's home directory
ENV HOME=/home/user \
PATH=/home/user/.local/bin:$PATH
# Set the working directory to the user's home directory
WORKDIR $HOME/app
COPY --chown=user . $HOME/app
EXPOSE 7860
#ENTRYPOINT ["/home/user/app/rpc-server", "-p", "7860", "-H", "0.0.0.0"]
CMD ["/usr/bin/python3", "-m", "http.server", "7860"]