Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +15 -27
Dockerfile
CHANGED
|
@@ -42,38 +42,12 @@ ENV LD_LIBRARY_PATH=${CUDA_HOME}/lib64:${LD_LIBRARY_PATH}
|
|
| 42 |
ENV CUDA_DEVICE_ORDER=PCI_BUS_ID
|
| 43 |
ENV CUDA_VISIBLE_DEVICES=0
|
| 44 |
|
| 45 |
-
|
| 46 |
-
|
| 47 |
-
|
| 48 |
-
# Install system dependencies as root
|
| 49 |
-
USER root
|
| 50 |
-
|
| 51 |
-
# Set Python 3.8 as the default python and pip versions
|
| 52 |
-
RUN update-alternatives --install /usr/bin/python python /usr/bin/python3.8 1
|
| 53 |
-
RUN update-alternatives --install /usr/bin/pip pip /usr/bin/pip3 1
|
| 54 |
-
|
| 55 |
# Clone the repository (adjust the URL if needed)
|
| 56 |
-
RUN git clone --recursive https://github.com/jnjaby/KEEP.git
|
| 57 |
-
|
| 58 |
-
# Set Git ownership for the cloned repository
|
| 59 |
-
USER root
|
| 60 |
-
RUN git config --global --add safe.directory $HOME/app
|
| 61 |
-
USER user
|
| 62 |
|
| 63 |
# Set the working directory to the user's home directory
|
| 64 |
WORKDIR $HOME/app
|
| 65 |
|
| 66 |
-
# Copy the app.py script into the container
|
| 67 |
-
COPY app.py .
|
| 68 |
-
COPY requirements_HF.txt .
|
| 69 |
-
|
| 70 |
-
# Install Python dependencies from requirements.txt
|
| 71 |
-
RUN pip install --upgrade pip
|
| 72 |
-
RUN pip install -r requirements_HF.txt
|
| 73 |
-
RUN pip install gradio
|
| 74 |
-
RUN pip install "numpy<1.25,>=1.18"
|
| 75 |
-
RUN pip install cupy==10.4.0
|
| 76 |
-
|
| 77 |
USER root
|
| 78 |
# Install basicsr
|
| 79 |
RUN if [ -d "basicsr" ]; then \
|
|
@@ -88,6 +62,20 @@ RUN if [ -d "basicsr" ]; then \
|
|
| 88 |
fi
|
| 89 |
|
| 90 |
USER user
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 91 |
# Install additional Python packages
|
| 92 |
RUN pip install ffmpeg-python
|
| 93 |
RUN pip install dlib
|
|
|
|
| 42 |
ENV CUDA_DEVICE_ORDER=PCI_BUS_ID
|
| 43 |
ENV CUDA_VISIBLE_DEVICES=0
|
| 44 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 45 |
# Clone the repository (adjust the URL if needed)
|
| 46 |
+
RUN git clone --recursive https://github.com/jnjaby/KEEP.git $HOME/app
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 47 |
|
| 48 |
# Set the working directory to the user's home directory
|
| 49 |
WORKDIR $HOME/app
|
| 50 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 51 |
USER root
|
| 52 |
# Install basicsr
|
| 53 |
RUN if [ -d "basicsr" ]; then \
|
|
|
|
| 62 |
fi
|
| 63 |
|
| 64 |
USER user
|
| 65 |
+
|
| 66 |
+
|
| 67 |
+
# Copy the app.py script into the container
|
| 68 |
+
COPY app.py .
|
| 69 |
+
COPY requirements_HF.txt .
|
| 70 |
+
|
| 71 |
+
# Install Python dependencies from requirements.txt
|
| 72 |
+
RUN pip install --upgrade pip
|
| 73 |
+
RUN pip install -r requirements_HF.txt
|
| 74 |
+
RUN pip install gradio
|
| 75 |
+
RUN pip install "numpy<1.25,>=1.18"
|
| 76 |
+
RUN pip install cupy-wheel
|
| 77 |
+
|
| 78 |
+
USER user
|
| 79 |
# Install additional Python packages
|
| 80 |
RUN pip install ffmpeg-python
|
| 81 |
RUN pip install dlib
|