-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathDockerfile
More file actions
40 lines (33 loc) · 1.06 KB
/
Dockerfile
File metadata and controls
40 lines (33 loc) · 1.06 KB
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
FROM pytorch/pytorch:1.11.0-cuda11.3-cudnn8-runtime
RUN apt update -y && apt install -y \
git
RUN apt-get update && apt-get install -y \
build-essential \
libsndfile1 \
vim \
libgl1-mesa-dev \
libglib2.0-0
# 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
RUN pip install git+https://github.com/facebookresearch/segment-anything.git
# Language 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/* \
&& mkdir -p /home/$USERNAME
# Directory settings for login
WORKDIR /working
RUN chmod 777 /working