Spaces:
Paused
Paused
Update Dockerfile
Browse files- Dockerfile +27 -28
Dockerfile
CHANGED
@@ -23,15 +23,15 @@ RUN useradd -m -u 1000 user
|
|
23 |
USER user
|
24 |
|
25 |
ENV HOME=/home/user \
|
26 |
-
|
27 |
PYTHONPATH=$HOME/app \
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
GRADIO_SHARE=False \
|
34 |
-
|
35 |
|
36 |
# Set CUDA_HOME environment variable
|
37 |
ENV CUDA_HOME=/usr/local/cuda-11.8
|
@@ -42,34 +42,33 @@ 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 |
-
# 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 |
-
|
52 |
-
|
53 |
-
RUN python basicsr/setup.py develop
|
54 |
-
|
55 |
-
USER user
|
56 |
|
|
|
|
|
|
|
57 |
|
58 |
-
#
|
59 |
-
|
60 |
-
|
|
|
|
|
|
|
|
|
61 |
|
62 |
-
|
63 |
-
|
64 |
-
RUN
|
65 |
-
|
66 |
-
|
67 |
-
|
|
|
68 |
|
69 |
USER user
|
70 |
-
# Install additional Python packages
|
71 |
-
RUN pip install ffmpeg-python
|
72 |
-
RUN pip install dlib
|
73 |
|
74 |
# Command to run your application
|
75 |
-
CMD ["python", "app.py"]
|
|
|
23 |
USER user
|
24 |
|
25 |
ENV HOME=/home/user \
|
26 |
+
PATH=/home/user/.local/bin:$PATH \
|
27 |
PYTHONPATH=$HOME/app \
|
28 |
+
PYTHONUNBUFFERED=1 \
|
29 |
+
GRADIO_ALLOW_FLAGGING=never \
|
30 |
+
GRADIO_NUM_PORTS=1 \
|
31 |
+
GRADIO_SERVER_NAME=0.0.0.0 \
|
32 |
+
GRADIO_THEME=huggingface \
|
33 |
GRADIO_SHARE=False \
|
34 |
+
SYSTEM=spaces
|
35 |
|
36 |
# Set CUDA_HOME environment variable
|
37 |
ENV CUDA_HOME=/usr/local/cuda-11.8
|
|
|
42 |
ENV CUDA_DEVICE_ORDER=PCI_BUS_ID
|
43 |
ENV CUDA_VISIBLE_DEVICES=0
|
44 |
|
|
|
|
|
|
|
45 |
# Set the working directory to the user's home directory
|
46 |
WORKDIR $HOME/app
|
47 |
|
48 |
+
# Clone the repository (adjust the URL if needed)
|
49 |
+
RUN git clone --recursive https://github.com/jnjaby/KEEP.git .
|
|
|
|
|
|
|
50 |
|
51 |
+
# Copy the app.py script and requirements file into the container
|
52 |
+
COPY --chown=user:user app.py .
|
53 |
+
COPY --chown=user:user requirements_HF.txt .
|
54 |
|
55 |
+
# Install Python dependencies
|
56 |
+
RUN pip install --upgrade pip && \
|
57 |
+
pip install -r requirements_HF.txt && \
|
58 |
+
pip install gradio && \
|
59 |
+
pip install "numpy<1.25,>=1.18" && \
|
60 |
+
pip install cupy-cuda11x && \
|
61 |
+
pip install ffmpeg-python dlib
|
62 |
|
63 |
+
USER root
|
64 |
+
# Install basicsr
|
65 |
+
RUN cd basicsr && \
|
66 |
+
if [ ! -f "basicsr/VERSION" ]; then \
|
67 |
+
echo "1.3.2" > basicsr/VERSION; \
|
68 |
+
fi && \
|
69 |
+
python setup.py develop
|
70 |
|
71 |
USER user
|
|
|
|
|
|
|
72 |
|
73 |
# Command to run your application
|
74 |
+
CMD ["python", "app.py"]
|