Spaces:
Running
Running
Update Dockerfile
Browse files- Dockerfile +14 -11
Dockerfile
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
# Use an official PyTorch image with CUDA support as the base image
|
2 |
-
FROM pytorch/pytorch:2.0.1-
|
3 |
|
4 |
# Install Git and system libraries required for OpenGL without interactive prompts
|
5 |
ENV DEBIAN_FRONTEND=noninteractive
|
@@ -14,15 +14,15 @@ RUN useradd -m -u 1000 user
|
|
14 |
USER user
|
15 |
|
16 |
ENV HOME=/home/user \
|
17 |
-
|
18 |
PYTHONPATH=$HOME/app \
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
GRADIO_SHARE=False \
|
25 |
-
|
26 |
|
27 |
# Set the working directory to the user's home directory
|
28 |
WORKDIR $HOME/app
|
@@ -30,8 +30,11 @@ WORKDIR $HOME/app
|
|
30 |
# Clone your repository or add your code to the container
|
31 |
RUN git clone -b main https://github.com/fffiloni/Hotshot-XL $HOME/app
|
32 |
|
|
|
|
|
|
|
33 |
# Install dependencies
|
34 |
-
RUN pip install --no-cache-dir -r requirements.txt gradio accelerate
|
35 |
|
36 |
RUN find $HOME/app
|
37 |
|
@@ -39,5 +42,5 @@ RUN find $HOME/app
|
|
39 |
ENV CUDA_DEVICE_ORDER=PCI_BUS_ID
|
40 |
ENV CUDA_VISIBLE_DEVICES=0
|
41 |
|
42 |
-
# Run
|
43 |
-
CMD ["python", "
|
|
|
1 |
# Use an official PyTorch image with CUDA support as the base image
|
2 |
+
FROM pytorch/pytorch:2.3.0-cuda12.1-cudnn8-runtime
|
3 |
|
4 |
# Install Git and system libraries required for OpenGL without interactive prompts
|
5 |
ENV DEBIAN_FRONTEND=noninteractive
|
|
|
14 |
USER user
|
15 |
|
16 |
ENV HOME=/home/user \
|
17 |
+
PATH=/home/user/.local/bin:$PATH \
|
18 |
PYTHONPATH=$HOME/app \
|
19 |
+
PYTHONUNBUFFERED=1 \
|
20 |
+
GRADIO_ALLOW_FLAGGING=never \
|
21 |
+
GRADIO_NUM_PORTS=1 \
|
22 |
+
GRADIO_SERVER_NAME=0.0.0.0 \
|
23 |
+
GRADIO_THEME=huggingface \
|
24 |
GRADIO_SHARE=False \
|
25 |
+
SYSTEM=spaces
|
26 |
|
27 |
# Set the working directory to the user's home directory
|
28 |
WORKDIR $HOME/app
|
|
|
30 |
# Clone your repository or add your code to the container
|
31 |
RUN git clone -b main https://github.com/fffiloni/Hotshot-XL $HOME/app
|
32 |
|
33 |
+
# Add the wrapper script
|
34 |
+
COPY run_app.py $HOME/app/
|
35 |
+
|
36 |
# Install dependencies
|
37 |
+
RUN pip install --no-cache-dir -r requirements.txt gradio accelerate gradio-auth
|
38 |
|
39 |
RUN find $HOME/app
|
40 |
|
|
|
42 |
ENV CUDA_DEVICE_ORDER=PCI_BUS_ID
|
43 |
ENV CUDA_VISIBLE_DEVICES=0
|
44 |
|
45 |
+
# Run the wrapper script
|
46 |
+
CMD ["python", "run_app.py"]
|