File size: 1,275 Bytes
d748e73
136cd64
609bd38
19aa0b3
5eac769
59efcc9
8768b5d
 
 
 
 
540d42e
8768b5d
59efcc9
 
8768b5d
ec239e2
607acc8
b018df1
f22a4b2
6fb797c
 
 
 
 
5eac769
b018df1
e38640f
 
 
e5ad2e4
e38640f
 
59efcc9
e38640f
b018df1
e1587e4
b018df1
 
118bde5
fcf4b57
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

FROM ubuntu:devel

USER root

ENV HOME=/root \
    PYTHONUNBUFFERED=1 \
    GRADIO_ALLOW_FLAGGING=never \
    GRADIO_NUM_PORTS=1 \
    GRADIO_SERVER_NAME=0.0.0.0 \
    GRADIO_THEME=huggingface \
    SYSTEM=spaces

COPY --chown=root --chmod=a+xrw . ~/app
WORKDIR ~/app

run apt-get update > /dev/null
run apt-get install -y git curl nvidia-cuda-toolkit wget git-lfs ffmpeg libsm6 libxext6 cmake rsync gcc make python3-venv python3-pip libgl1 python3 libglx-mesa0

run mkdir -p ~/miniconda
run wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O ~/miniconda/install.sh
run bash ~/miniconda/install.sh -b -u -p ~/miniconda
run ~/miniconda/bin/conda init bash
run ~/miniconda/bin/activate
run ~/miniconda/bin/conda env create -f ./env.yml

run git lfs install --force
#run git clone https://github.com/python/cpython
#run cd cpython && ./configure --enable-optimizations --with-lto --prefix=$HOME/app/python --with-system-libmpdec=no > /dev/null
#run cd cpython && make > /dev/null
#run cd cpython && make test > /dev/null
#run cd cpython && make install > /dev/null
#run cd cpython && make clean

run PATH="${PATH:+${PATH}:}$HOME/miniconda/bin"

#run pip3 install --upgrade --no-cache-dir -r deps.txt

EXPOSE 7860

ENTRYPOINT ["python3", "./code.py"]