|
ARG UBUNTU_VERSION=22.04 |
|
|
|
ARG CUDA_VERSION=12.6.0 |
|
|
|
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/* |
|
|
|
|
|
RUN useradd -m -u 1000 user && echo "user:pass" | chpasswd && adduser user sudo |
|
|
|
|
|
USER user |
|
|
|
|
|
ENV HOME=/home/user \ |
|
PATH=/home/user/.local/bin:$PATH |
|
|
|
|
|
WORKDIR $HOME/app |
|
COPY --chown=user . $HOME/app |
|
|
|
EXPOSE 7860 |
|
|
|
|
|
CMD ["/usr/bin/python3", "-m", "http.server", "7860"] |
|
|