fffiloni commited on
Commit
e430f4f
·
verified ·
1 Parent(s): 6b6f2a6

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +15 -10
Dockerfile CHANGED
@@ -6,10 +6,17 @@ ENV MKL_THREADING_LAYER=GNU
6
  # Install dependencies
7
  RUN apt-get update && apt-get install -y \
8
  git wget libgl1-mesa-glx libglib2.0-0 ffmpeg libx264-dev pkg-config \
9
- build-essential cmake g++ python3-dev software-properties-common \
10
- wget gnupg2 libopenblas-dev && \
11
  rm -rf /var/lib/apt/lists/*
12
 
 
 
 
 
 
 
 
13
  # Add NVIDIA package repositories
14
  RUN wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/cuda-keyring_1.0-1_all.deb && \
15
  dpkg -i cuda-keyring_1.0-1_all.deb && \
@@ -51,14 +58,12 @@ RUN git clone -b dev https://github.com/fffiloni/dreamtalk $HOME/app
51
  RUN wget https://huggingface.co/camenduru/dreamtalk/resolve/main/damo/dreamtalk/checkpoints/denoising_network.pth -O $HOME/app/checkpoints/denoising_network.pth
52
  RUN wget https://huggingface.co/camenduru/dreamtalk/resolve/main/damo/dreamtalk/checkpoints/renderer.pt -O $HOME/app/checkpoints/renderer.pt
53
 
54
- # Upgrade pip & install dependencies
55
- RUN pip install --upgrade pip setuptools wheel
56
- RUN pip install --no-cache-dir urllib3 transformers yacs scipy scikit-image scikit-learn PyYAML Pillow "numpy<2" opencv-python imageio ffmpeg-python av "moviepy<2" gradio
57
-
58
- # Install CMake first
59
- RUN pip install cmake
60
 
61
- RUN pip install dlib==19.24.0 -vvv
 
 
62
 
63
  # Copy application file
64
  COPY app.py .
@@ -68,4 +73,4 @@ ENV CUDA_DEVICE_ORDER=PCI_BUS_ID
68
  ENV CUDA_VISIBLE_DEVICES=0
69
 
70
  # Run the application
71
- CMD ["python", "app.py"]
 
6
  # Install dependencies
7
  RUN apt-get update && apt-get install -y \
8
  git wget libgl1-mesa-glx libglib2.0-0 ffmpeg libx264-dev pkg-config \
9
+ build-essential cmake g++ python3.9 python3.9-dev python3.9-venv \
10
+ software-properties-common wget gnupg2 libopenblas-dev && \
11
  rm -rf /var/lib/apt/lists/*
12
 
13
+ # Ensure Python 3.9 is the default version
14
+ RUN update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.9 1 && \
15
+ update-alternatives --set python3 /usr/bin/python3.9
16
+
17
+ # Install pip for Python 3.9
18
+ RUN curl -sS https://bootstrap.pypa.io/get-pip.py | python3.9
19
+
20
  # Add NVIDIA package repositories
21
  RUN wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/cuda-keyring_1.0-1_all.deb && \
22
  dpkg -i cuda-keyring_1.0-1_all.deb && \
 
58
  RUN wget https://huggingface.co/camenduru/dreamtalk/resolve/main/damo/dreamtalk/checkpoints/denoising_network.pth -O $HOME/app/checkpoints/denoising_network.pth
59
  RUN wget https://huggingface.co/camenduru/dreamtalk/resolve/main/damo/dreamtalk/checkpoints/renderer.pt -O $HOME/app/checkpoints/renderer.pt
60
 
61
+ # Upgrade pip & install dependencies for Python 3.9
62
+ RUN python3.9 -m ensurepip && python3.9 -m pip install --upgrade pip setuptools wheel
 
 
 
 
63
 
64
+ # Install dependencies using Python 3.9
65
+ RUN python3.9 -m pip install --no-cache-dir urllib3 transformers yacs scipy scikit-image scikit-learn \
66
+ PyYAML Pillow "numpy<2" opencv-python imageio ffmpeg-python av "moviepy<2" gradio cmake dlib==19.24.0 -vvv
67
 
68
  # Copy application file
69
  COPY app.py .
 
73
  ENV CUDA_VISIBLE_DEVICES=0
74
 
75
  # Run the application
76
+ CMD ["python3.9", "app.py"]