File size: 1,618 Bytes
035df8d
91f0bb6
3c9c655
035df8d
 
 
 
 
 
 
 
 
4da54d1
954473c
6e6edc9
fbf1e1c
7421fab
954473c
a6a48d1
954473c
89b7fb7
 
 
7069770
 
01aee65
7069770
 
 
 
 
 
3c9c655
 
 
 
 
 
4d7a13c
035df8d
cf95753
3c9c655
035df8d
82043bd
 
 
 
 
 
3c9c655
 
 
7903e83
 
 
3c9c655
 
 
 
 
 
82043bd
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
FROM nvidia/cuda:11.3.1-cudnn8-devel-ubuntu18.04
CMD nvidia-smi

ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update && apt-get install -y \
        git \
        make build-essential libssl-dev zlib1g-dev \
        libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm \
        libncursesw5-dev xz-utils tk-dev libxml2-dev libxmlsec1-dev libffi-dev liblzma-dev  \
    	ffmpeg libsm6 libxext6 cmake libgl1-mesa-glx \
		&& rm -rf /var/lib/apt/lists/*


RUN apt-get -y update
RUN apt install -y software-properties-common
RUN add-apt-repository ppa:deadsnakes/ppa
RUN apt-get -y install python3.9
RUN apt-get -y install python3-pip
RUN apt install python3.9-distutils

RUN useradd -ms /bin/bash admin
USER admin

# ENV HOME=/home/user \
# 	PATH=/home/user/.local/bin:$PATH

# RUN curl https://pyenv.run | bash
# ENV PATH=$HOME/.pyenv/shims:$HOME/.pyenv/bin:$PATH
# RUN pyenv install 3.8.15 && \
#     pyenv global 3.8.15 && \
#     pyenv rehash && \
#     pip install --no-cache-dir --upgrade pip setuptools wheel

ENV WORKDIR=/code
WORKDIR $WORKDIR
RUN chown -R admin:admin $WORKDIR
RUN chmod 755 $WORKDIR

# RUN nvidia-smi


COPY requirements.txt $WORKDIR/requirements.txt
COPY oneformer $WORKDIR/oneformer
RUN python3.9 --version
RUN python3.9 -m pip install --upgrade pip
RUN python3.9 -m pip install multidict
RUN python3.9 -m pip install typing-extensions
RUN python3.9 -m pip install gradio --no-cache-dir
RUN python3.9 -m pip install --no-cache-dir --upgrade -r $WORKDIR/requirements.txt

COPY . .

RUN pwd
RUN ls

RUN sh deform_setup.sh

USER admin

EXPOSE 7860

ENTRYPOINT ["python3.9", "gradio_app.py"]