Spaces:
mucusz
/
Runtime error

Yuliang commited on
Commit
337d241
1 Parent(s): 1f20c61

update docker

Browse files
Files changed (4) hide show
  1. Dockerfile +66 -0
  2. README.md +1 -3
  3. packages.txt +0 -11
  4. requirements.txt +1 -0
Dockerfile ADDED
@@ -0,0 +1,66 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM nvidia/cuda:11.6.1-cudnn8-devel-ubuntu20.04
2
+
3
+ ARG DEBIAN_FRONTEND=noninteractive
4
+
5
+ RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
6
+ libgl1 \
7
+ freeglut3-dev \
8
+ unzip \
9
+ ffmpeg \
10
+ libsm6 \
11
+ libxext6 \
12
+ libgl1-mesa-dri \
13
+ libegl1-mesa \
14
+ libgbm1 \
15
+ build-essential \
16
+ libeigen3-dev \
17
+ python3.8 \
18
+ python3-pip \
19
+ nvidia-cuda-toolkit
20
+
21
+ # Set up a new user named "user" with user ID 1000
22
+ RUN useradd -m -u 1000 user
23
+
24
+ # Switch to the "user" user
25
+ USER user
26
+
27
+ FROM python:3.8
28
+
29
+ ENV PYTHONUNBUFFERED=1
30
+
31
+ ENV TORCH_CUDA_ARCH_LIST="6.0 6.1 7.0 7.5 8.0 8.6"
32
+ ENV TCNN_CUDA_ARCHITECTURES=86;80;75;70;61;60
33
+ ENV FORCE_CUDA=1
34
+
35
+ ENV CUDA_HOME=/usr/local/cuda
36
+ ENV PATH=${CUDA_HOME}/bin:/home/${USER_NAME}/.local/bin:/usr/bin:${PATH}
37
+ ENV LD_LIBRARY_PATH=${CUDA_HOME}/lib64:${LD_LIBRARY_PATH}
38
+ ENV LIBRARY_PATH=${CUDA_HOME}/lib64/stubs:${LIBRARY_PATH}
39
+
40
+
41
+ # Set home to the user's home directory
42
+ ENV HOME=/home/user \
43
+ PYTHONPATH=$HOME/app \
44
+ PYTHONUNBUFFERED=1 \
45
+ GRADIO_ALLOW_FLAGGING=never \
46
+ GRADIO_NUM_PORTS=1 \
47
+ GRADIO_SERVER_NAME=0.0.0.0 \
48
+ GRADIO_THEME=huggingface \
49
+ SYSTEM=spaces
50
+
51
+ RUN pip install --upgrade pip ninja
52
+ RUN pip install setuptools==69.5.1
53
+
54
+ COPY requirements.txt /tmp
55
+ RUN cd /tmp && pip install -r requirements.txt
56
+
57
+ RUN pip install --no-index --no-cache-dir pytorch3d -f https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/py38_cu116_pyt1130/download.html
58
+ RUN python -c "import torch; print(torch.version.cuda)"
59
+
60
+ # Set the working directory to the user's home directory
61
+ WORKDIR $HOME/app
62
+
63
+ # Copy the current directory contents into the container at $HOME/app setting the owner to the user
64
+ COPY --chown=user . $HOME/app
65
+
66
+ CMD ["python", "app.py"]
README.md CHANGED
@@ -4,11 +4,9 @@ metaTitle: ECON-Avatarify from Photo
4
  emoji: 🤼
5
  colorFrom: green
6
  colorTo: pink
7
- sdk: gradio
8
- sdk_version: 4.36.1
9
  app_file: app.py
10
  pinned: true
11
- python_version: 3.8.15
12
  ---
13
 
14
  # Unconstrained & Detailed Clothed Human Digitization (ECON + ControlNet)
 
4
  emoji: 🤼
5
  colorFrom: green
6
  colorTo: pink
7
+ sdk: docker
 
8
  app_file: app.py
9
  pinned: true
 
10
  ---
11
 
12
  # Unconstrained & Detailed Clothed Human Digitization (ECON + ControlNet)
packages.txt DELETED
@@ -1,11 +0,0 @@
1
- libgl1
2
- freeglut3-dev
3
- unzip
4
- ffmpeg
5
- libsm6
6
- libxext6
7
- libgl1-mesa-dri
8
- libegl1-mesa
9
- libgbm1
10
- build-essential
11
- libeigen3-dev
 
 
 
 
 
 
 
 
 
 
 
 
requirements.txt CHANGED
@@ -29,4 +29,5 @@ xformers==0.0.16
29
  triton
30
  diffusers
31
  accelerate
 
32
  git+https://github.com/YuliangXiu/rembg.git
 
29
  triton
30
  diffusers
31
  accelerate
32
+ gradio
33
  git+https://github.com/YuliangXiu/rembg.git