-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
37 lines (31 loc) · 951 Bytes
/
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
FROM pytorch/pytorch:2.2.1-cuda12.1-cudnn8-runtime
RUN apt update -y && apt install -y \
git curl unzip tar
RUN apt-get update && apt-get install -y \
build-essential \
libsndfile1 \
vim \
libgl1-mesa-dev \
libglib2.0-0 \
wget \
unzip
# Copy files from host to the image.
COPY requirements.txt /tmp/requirements.txt
# Install python package, remove copied file and cache.
RUN pip install --upgrade pip && \
pip install -r /tmp/requirements.txt
# settings
ENV LANG=C.UTF-8
ENV LANGUAGE=en_US
# Create the user.
ARG USERNAME
ARG USER_UID
ARG USER_GID
RUN groupadd --gid $USER_GID $USERNAME \
&& useradd --uid $USER_UID --gid $USER_GID -m $USERNAME \
&& apt-get update \
&& apt-get install -y --no-install-recommends sudo \
&& echo $USERNAME ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME \
&& chmod 0440 /etc/sudoers.d/$USERNAME \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /workspace