File size: 979 Bytes
154fc14
 
1b58f4d
ecd441a
 
154fc14
ecd441a
154fc14
 
caea732
507e230
154fc14
bbb6afc
91d5a7a
0c378dc
bbb6afc
 
 
 
 
 
 
 
 
230e29a
154fc14
ce43a08
 
bd25c21
2455334
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
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"]