Update Dockerfile
Browse files- Dockerfile +16 -2
Dockerfile
CHANGED
|
@@ -1,9 +1,23 @@
|
|
| 1 |
-
#
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2 |
|
| 3 |
# Install your requirements
|
| 4 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 5 |
|
| 6 |
-
#
|
|
|
|
| 7 |
RUN sed -i 's/from torchvision.transforms.functional_tensor import rgb_to_grayscale/from torchvision.transforms.functional import rgb_to_grayscale/g' /usr/local/lib/python3.10/site-packages/basicsr/data/degradations.py
|
| 8 |
|
| 9 |
# --- NEW LINE HERE ---
|
|
|
|
| 1 |
+
# FORCE Python 3.10
|
| 2 |
+
FROM python:3.10
|
| 3 |
+
|
| 4 |
+
# Set the working directory
|
| 5 |
+
WORKDIR /app
|
| 6 |
+
|
| 7 |
+
# Install git and ffmpeg (Required for SadTalker video generation)
|
| 8 |
+
RUN apt-get update && apt-get install -y git ffmpeg
|
| 9 |
+
|
| 10 |
+
# Copy your files into the container
|
| 11 |
+
COPY . .
|
| 12 |
+
|
| 13 |
+
# Upgrade pip
|
| 14 |
+
RUN pip install --no-cache-dir --upgrade pip setuptools wheel
|
| 15 |
|
| 16 |
# Install your requirements
|
| 17 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 18 |
|
| 19 |
+
# --- THE FIX IS HERE ---
|
| 20 |
+
# This command finds the broken file in the library and edits the code to fix the import error automatically.
|
| 21 |
RUN sed -i 's/from torchvision.transforms.functional_tensor import rgb_to_grayscale/from torchvision.transforms.functional import rgb_to_grayscale/g' /usr/local/lib/python3.10/site-packages/basicsr/data/degradations.py
|
| 22 |
|
| 23 |
# --- NEW LINE HERE ---
|