-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
55 lines (46 loc) · 1.21 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
49
50
51
52
53
54
55
# SPDX-FileCopyrightText: 2024 nacky823 [email protected]
# SPDX-License-Identifier: Apache-2.0
FROM nvidia/cuda:12.1.0-cudnn8-devel-ubuntu22.04
ARG USERNAME="mugimaru"
ARG UID_AND_GID=1234
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y \
apt-utils \
bash-completion \
curl \
eog \
git \
gnupg2 \
lsb-release \
network-manager \
python3 \
python3-pip \
python3-tk \
python3-venv \
sudo \
terminator \
tree \
tzdata \
unzip \
vim \
wget \
x11-apps \
xterm && \
apt-get autoremove -y -qq && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
ENV USERNAME=$USERNAME
ENV USER=$USERNAME
RUN groupadd -g $UID_AND_GID $USERNAME && \
useradd -ms /bin/bash -u $UID_AND_GID -g $UID_AND_GID -d /home/$USERNAME $USERNAME && \
chown -R $USERNAME:$USERNAME /home/$USERNAME && \
echo "$USERNAME ALL=(ALL:ALL) NOPASSWD:ALL" >> /etc/sudoers
ENV TZ="Asia/Tokyo"
RUN echo $TZ > /etc/timezone && \
ln -snf /usr/share/zoneinfo/$TZ /etc/localtime
USER $USERNAME
WORKDIR /home/$USERNAME
COPY setup.sh /home/$USERNAME/
RUN . /home/$USERNAME/setup.sh
COPY install_packages.bash /home/$USERNAME/
CMD ["/bin/bash"]