-
Notifications
You must be signed in to change notification settings - Fork 3
/
Dockerfile
48 lines (41 loc) · 1.02 KB
/
Dockerfile
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
FROM nvidia/cuda:12.3.2-cudnn9-runtime-ubuntu22.04
# Set timezone
ENV TZ=Europe/Rome
RUN ln -sf /usr/share/zoneinfo/Europe/Rome /etc/localtime
# Update the package list and install dependencies
RUN apt-get update && apt-get install -y \
dialog \
apt-utils \
build-essential \
cmake \
curl \
g++ \
wget \
bzip2 \
git \
nano \
tmux \
screen \
tree \
htop \
zip \
unzip \
ca-certificates \
sudo
# install python and pip
RUN apt-get install -y python3 python3-pip
# set python3 as default python
RUN ln -s /usr/bin/python3 /usr/bin/python
# copy and install pip requirements
COPY requirements.txt /tmp/requirements.txt
RUN pip install -r /tmp/requirements.txt
# Create a non-root user
ARG UID
ARG GID
RUN addgroup --gid $GID nonroot && \
adduser --uid $UID --gid $GID --disabled-password --gecos "" nonroot
RUN echo "nonroot ALL=(ALL) ALL" >> /etc/sudoers
# Set the default user to the non-root user
USER nonroot
# Set the working directory
WORKDIR /home/nonroot