-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
29 lines (21 loc) · 750 Bytes
/
Dockerfile
File metadata and controls
29 lines (21 loc) · 750 Bytes
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
FROM pytorch/pytorch:1.13.1-cuda11.6-cudnn8-devel
ARG USER_NAME
ARG UID
ARG GID
ARG GROUP_NAME
RUN apt update
RUN apt install -y sudo git libgl1-mesa-dev libopencv-dev
# base
RUN pip install prospector black matplotlib ipykernel
RUN pip install opencv-python
# stable diffusion
RUN pip install diffusers[torch]==0.9 transformers
RUN pip install --upgrade --pre triton
RUN pip install --upgrade git+https://github.com/huggingface/diffusers.git transformers accelerate scipy
# add sudo user
RUN groupadd -g ${GID} ${GROUP_NAME}
RUN useradd -ms /bin/sh -u ${UID} -g ${GID} ${USER_NAME}
RUN echo "${USER_NAME}:hogehoge" | chpasswd
RUN echo "${USER_NAME} ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
RUN apt install -y vim
# USER ${USER_NAME}