File size: 1,180 Bytes
d748e73
136cd64
609bd38
19aa0b3
7bd79ac
59efcc9
8768b5d
 
 
 
 
540d42e
8768b5d
59efcc9
 
8768b5d
ec239e2
41df1b5
7bd79ac
41df1b5
f22a4b2
6fb797c
 
 
5eac769
e38640f
 
 
e5ad2e4
e38640f
 
59efcc9
7bd79ac
be61e50
 
 
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

FROM ubuntu:devel

USER root
EXPOSE 7860
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 git lfs install

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 env create -f ./env.yml

#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 ~/miniconda/bin/conda init
run ~/miniconda/bin/activate env

entrypoint ["~/miniconda/bin/activate","run","code.py"]