jmanhype commited on
Commit
9c6c16a
·
1 Parent(s): 58dbfa2

fix: remove regular Dockerfile to avoid confusion

Browse files
Files changed (2) hide show
  1. Dockerfile +0 -53
  2. app.py +24 -0
Dockerfile DELETED
@@ -1,53 +0,0 @@
1
- FROM nvidia/cuda:11.7.1-cudnn8-devel-ubuntu20.04
2
-
3
- ENV DEBIAN_FRONTEND=noninteractive
4
-
5
- # Add retry logic for apt-get
6
- RUN echo 'Acquire::Retries "3";' > /etc/apt/apt.conf.d/80-retries
7
-
8
- # Clean and update package lists
9
- RUN rm -rf /var/lib/apt/lists/* && \
10
- apt-get clean && \
11
- apt-get update --fix-missing
12
-
13
- # Install system dependencies with retry logic
14
- RUN apt-get install -y --no-install-recommends --fix-missing \
15
- git \
16
- python3-pip \
17
- python3-dev \
18
- ffmpeg \
19
- libsm6 \
20
- libxext6 \
21
- && rm -rf /var/lib/apt/lists/*
22
-
23
- # Set up a new user named "user" with user ID 1000
24
- RUN useradd -m -u 1000 user
25
- USER user
26
-
27
- # Set home to the user's home directory
28
- ENV HOME=/home/user \
29
- PATH=/home/user/.local/bin:$PATH \
30
- PYTHONPATH=/home/user/app:/home/user/app/MMCM:/home/user/app/diffusers/src:/home/user/app/controlnet_aux/src
31
-
32
- # Set the working directory
33
- WORKDIR $HOME/app
34
-
35
- # Copy the application code
36
- COPY --chown=user . .
37
-
38
- # Install dependencies
39
- RUN pip install --no-cache-dir -r requirements.txt
40
- RUN pip install --no-cache-dir gradio==4.12 spaces cuid huggingface_hub
41
-
42
- # Create data directory with correct permissions
43
- USER root
44
- RUN mkdir -p /data && chown -R user:user /data
45
- USER user
46
-
47
- WORKDIR $HOME/app/scripts/gradio
48
-
49
- # Expose the port
50
- EXPOSE 7860
51
-
52
- # Start the Gradio app
53
- CMD ["python", "app_gradio_space.py"]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app.py CHANGED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+
3
+ def process_video(video_path):
4
+ # Initialize the pipeline
5
+ # pipeline = MuseVPipeline()
6
+
7
+ # Process the video
8
+ # result = pipeline.process(video_path)
9
+
10
+ # For now, just return the input video
11
+ return video_path
12
+
13
+ # Create the Gradio interface
14
+ iface = gr.Interface(
15
+ fn=process_video,
16
+ inputs=gr.Video(label="Upload Video"),
17
+ outputs=gr.Video(label="Processed Video"),
18
+ title="MuseV - Video Processing",
19
+ description="Upload a video to process with MuseV"
20
+ )
21
+
22
+ # Launch the interface
23
+ if __name__ == "__main__":
24
+ iface.launch(server_name="0.0.0.0", server_port=7860)