Yaron Koresh commited on
Commit
59efcc9
·
verified ·
1 Parent(s): cf8591d

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +12 -13
Dockerfile CHANGED
@@ -3,38 +3,37 @@ FROM ubuntu:devel
3
 
4
  USER root
5
 
6
- ENV HOME=/home/user \
7
  PYTHONUNBUFFERED=1 \
8
- PYTHONPATH=$HOME/app/cpython \
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
- WORKDIR $HOME/app
16
- COPY --chown=user . $HOME/app
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 ~/miniconda3/miniconda.sh
24
- run bash ~/miniconda3/miniconda.sh -b -u -p ~/miniconda3
25
- run rm -rf ~/miniconda3/miniconda.sh
26
- run ~/miniconda3/bin/conda init bash
27
- run ~/miniconda3/bin/activate
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=$HOME/python --with-system-libmpdec=no
33
  run cd cpython && make
34
  run cd cpython && make test
35
  run cd cpython && make install
36
  run cd cpython && make clean
37
- run PATH="${PATH:+${PATH}:}$HOME/python"
 
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