mayuema commited on
Commit
c9bcdf1
1 Parent(s): 44ee087
Files changed (1) hide show
  1. Dockerfile +63 -0
Dockerfile ADDED
@@ -0,0 +1,63 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM nvidia/cuda:11.7.1-cudnn8-devel-ubuntu22.04
2
+ ENV DEBIAN_FRONTEND=noninteractive
3
+ RUN apt-get update && \
4
+ apt-get upgrade -y && \
5
+ apt-get install -y --no-install-recommends \
6
+ git \
7
+ zip \
8
+ unzip \
9
+ git-lfs \
10
+ wget \
11
+ curl \
12
+ # ffmpeg \
13
+ ffmpeg \
14
+ x264 \
15
+ # python build dependencies \
16
+ build-essential \
17
+ libssl-dev \
18
+ zlib1g-dev \
19
+ libbz2-dev \
20
+ libreadline-dev \
21
+ libsqlite3-dev \
22
+ libncursesw5-dev \
23
+ xz-utils \
24
+ tk-dev \
25
+ libxml2-dev \
26
+ libxmlsec1-dev \
27
+ libffi-dev \
28
+ liblzma-dev && \
29
+ apt-get clean && \
30
+ rm -rf /var/lib/apt/lists/*
31
+ # RUN apt-get update && \
32
+ # apt-get install zip
33
+ # RUN wget https://github.com/ChenyangQiQi/FateZero/releases/download/v0.0.1/style.zip && unzip style.zip
34
+ RUN useradd -m -u 1000 user
35
+ USER user
36
+ ENV HOME=/home/user \
37
+ PATH=/home/user/.local/bin:${PATH}
38
+ WORKDIR ${HOME}/app
39
+
40
+ RUN curl https://pyenv.run | bash
41
+ ENV PATH=${HOME}/.pyenv/shims:${HOME}/.pyenv/bin:${PATH}
42
+ ENV PYTHON_VERSION=3.10.9
43
+ RUN pyenv install ${PYTHON_VERSION} && \
44
+ pyenv global ${PYTHON_VERSION} && \
45
+ pyenv rehash && \
46
+ pip install --no-cache-dir -U pip setuptools wheel
47
+
48
+ RUN pip install --no-cache-dir -U torch==1.13.1 torchvision==0.14.1
49
+ COPY --chown=1000 requirements.txt /tmp/requirements.txt
50
+ RUN pip install --no-cache-dir -U -r /tmp/requirements.txt
51
+
52
+ COPY --chown=1000 . ${HOME}/app
53
+ RUN ls -a
54
+ # RUN cd ./FateZero/ckpt && bash download.sh
55
+ # RUN cd ./FateZero/data && bash download.sh
56
+ # ENV PYTHONPATH=${HOME}/app \
57
+ # PYTHONUNBUFFERED=1 \
58
+ # GRADIO_ALLOW_FLAGGING=never \
59
+ # GRADIO_NUM_PORTS=1 \
60
+ # GRADIO_SERVER_NAME=0.0.0.0 \
61
+ # GRADIO_THEME=huggingface \
62
+ # SYSTEM=spaces
63
+ # CMD ["python", "app_fatezero.py"]