Spaces:
Sleeping
Sleeping
Yaron Koresh
commited on
Update Dockerfile
Browse files- Dockerfile +12 -13
Dockerfile
CHANGED
@@ -3,38 +3,37 @@ FROM ubuntu:devel
|
|
3 |
|
4 |
USER root
|
5 |
|
6 |
-
ENV HOME=/
|
7 |
PYTHONUNBUFFERED=1 \
|
8 |
-
PYTHONPATH=$HOME/app/
|
9 |
GRADIO_ALLOW_FLAGGING=never \
|
10 |
GRADIO_NUM_PORTS=1 \
|
11 |
GRADIO_SERVER_NAME=0.0.0.0 \
|
12 |
GRADIO_THEME=huggingface \
|
13 |
SYSTEM=spaces
|
14 |
|
15 |
-
|
16 |
-
|
17 |
-
run chmod -R a+xrw .
|
18 |
|
19 |
run apt-get update
|
20 |
run apt-get install -y git curl nvidia-cuda-toolkit wget git-lfs ffmpeg libsm6 libxext6 cmake rsync gcc make python3-venv libgl1 libglx-mesa0
|
21 |
|
22 |
run mkdir -p ~/miniconda3
|
23 |
-
run wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O
|
24 |
-
run bash
|
25 |
-
run
|
26 |
-
run
|
27 |
-
run
|
28 |
-
run ~/miniconda3/bin/conda env create -f ./env.yml
|
29 |
|
30 |
run git lfs install --force
|
31 |
run git clone https://github.com/python/cpython
|
32 |
-
run cd cpython && ./configure --enable-optimizations --with-lto --prefix
|
33 |
run cd cpython && make
|
34 |
run cd cpython && make test
|
35 |
run cd cpython && make install
|
36 |
run cd cpython && make clean
|
37 |
-
|
|
|
38 |
|
39 |
run python -m pip install --upgrade --no-cache-dir pip
|
40 |
run python -m pip install --upgrade --no-cache-dir -r deps.txt
|
|
|
3 |
|
4 |
USER root
|
5 |
|
6 |
+
ENV HOME=/root \
|
7 |
PYTHONUNBUFFERED=1 \
|
8 |
+
PYTHONPATH=$HOME/app/python \
|
9 |
GRADIO_ALLOW_FLAGGING=never \
|
10 |
GRADIO_NUM_PORTS=1 \
|
11 |
GRADIO_SERVER_NAME=0.0.0.0 \
|
12 |
GRADIO_THEME=huggingface \
|
13 |
SYSTEM=spaces
|
14 |
|
15 |
+
COPY --chown=root --chmod=a+xrw . ~/app
|
16 |
+
WORKDIR ~/app
|
|
|
17 |
|
18 |
run apt-get update
|
19 |
run apt-get install -y git curl nvidia-cuda-toolkit wget git-lfs ffmpeg libsm6 libxext6 cmake rsync gcc make python3-venv libgl1 libglx-mesa0
|
20 |
|
21 |
run mkdir -p ~/miniconda3
|
22 |
+
run wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O ./miniconda/install.sh
|
23 |
+
run bash ./miniconda/install.sh -b -u -p ./miniconda
|
24 |
+
run ./miniconda/bin/conda init bash
|
25 |
+
run ./miniconda/bin/activate
|
26 |
+
run ./miniconda/bin/conda env create -f ./env.yml
|
|
|
27 |
|
28 |
run git lfs install --force
|
29 |
run git clone https://github.com/python/cpython
|
30 |
+
run cd cpython && ./configure --enable-optimizations --with-lto --prefix=~/app/python --with-system-libmpdec=no
|
31 |
run cd cpython && make
|
32 |
run cd cpython && make test
|
33 |
run cd cpython && make install
|
34 |
run cd cpython && make clean
|
35 |
+
|
36 |
+
run PATH="${PATH:+${PATH}:}$PYTHONPATH:$HOME/app/miniconda/bin"
|
37 |
|
38 |
run python -m pip install --upgrade --no-cache-dir pip
|
39 |
run python -m pip install --upgrade --no-cache-dir -r deps.txt
|