Spaces:
Runtime error
Runtime error
jmanhype
commited on
Commit
·
1ae0e63
1
Parent(s):
231fef0
Fix directory structure and improve error reporting
Browse files- Dockerfile +16 -17
- app.py +11 -1
Dockerfile
CHANGED
@@ -43,37 +43,36 @@ RUN pip install --no-cache-dir openmim && \
|
|
43 |
mim install "mmdet>=3.1.0" && \
|
44 |
mim install "mmpose>=1.1.0"
|
45 |
|
46 |
-
#
|
47 |
-
|
48 |
-
|
49 |
-
# Clone and set up MuseV
|
50 |
-
RUN git clone https://github.com/TMElyralab/MuseV.git && \
|
51 |
-
cd MuseV && \
|
52 |
git clone https://github.com/huggingface/diffusers.git && \
|
53 |
git clone https://github.com/patrickvonplaten/controlnet_aux.git && \
|
54 |
cd diffusers && pip install -e . && \
|
55 |
-
cd ../controlnet_aux && pip install -e .
|
56 |
-
cd .. && \
|
57 |
-
# Copy gradio scripts to parent directory
|
58 |
-
cp scripts/gradio/gradio_video2video.py ../gradio_video2video.py && \
|
59 |
-
cp scripts/gradio/gradio_text2video.py ../gradio_text2video.py && \
|
60 |
-
chmod +x ../gradio_*.py
|
61 |
|
62 |
-
#
|
63 |
-
|
64 |
|
65 |
-
#
|
66 |
-
RUN
|
|
|
|
|
|
|
|
|
|
|
67 |
echo "Directory contents:" && ls -la && \
|
68 |
echo "MuseV directory contents:" && ls -la MuseV && \
|
69 |
echo "Gradio scripts directory contents:" && ls -la MuseV/scripts/gradio && \
|
70 |
-
echo "Python path:" && echo $PYTHONPATH && \
|
71 |
echo "Checking gradio scripts:" && ls -la gradio_*.py && \
|
72 |
echo "Verifying file contents:" && \
|
73 |
cat gradio_video2video.py | head -n 5 && \
|
74 |
echo "---" && \
|
75 |
cat gradio_text2video.py | head -n 5
|
76 |
|
|
|
|
|
|
|
77 |
EXPOSE 7860
|
78 |
|
79 |
CMD ["python", "-u", "app.py"]
|
|
|
43 |
mim install "mmdet>=3.1.0" && \
|
44 |
mim install "mmpose>=1.1.0"
|
45 |
|
46 |
+
# Clone and set up MuseV in a temporary directory
|
47 |
+
RUN git clone https://github.com/TMElyralab/MuseV.git /tmp/MuseV && \
|
48 |
+
cd /tmp/MuseV && \
|
|
|
|
|
|
|
49 |
git clone https://github.com/huggingface/diffusers.git && \
|
50 |
git clone https://github.com/patrickvonplaten/controlnet_aux.git && \
|
51 |
cd diffusers && pip install -e . && \
|
52 |
+
cd ../controlnet_aux && pip install -e .
|
|
|
|
|
|
|
|
|
|
|
53 |
|
54 |
+
# Copy application code
|
55 |
+
COPY --chown=user:user . .
|
56 |
|
57 |
+
# Move MuseV from temp to workspace
|
58 |
+
RUN cp -r /tmp/MuseV/* MuseV/ && \
|
59 |
+
# Copy gradio scripts to app directory
|
60 |
+
cp MuseV/scripts/gradio/gradio_video2video.py . && \
|
61 |
+
cp MuseV/scripts/gradio/gradio_text2video.py . && \
|
62 |
+
chmod +x gradio_*.py && \
|
63 |
+
# Verify the setup
|
64 |
echo "Directory contents:" && ls -la && \
|
65 |
echo "MuseV directory contents:" && ls -la MuseV && \
|
66 |
echo "Gradio scripts directory contents:" && ls -la MuseV/scripts/gradio && \
|
|
|
67 |
echo "Checking gradio scripts:" && ls -la gradio_*.py && \
|
68 |
echo "Verifying file contents:" && \
|
69 |
cat gradio_video2video.py | head -n 5 && \
|
70 |
echo "---" && \
|
71 |
cat gradio_text2video.py | head -n 5
|
72 |
|
73 |
+
# Set up Python path
|
74 |
+
ENV PYTHONPATH="${HOME}/app:${HOME}/app/MuseV:${HOME}/app/MuseV/MMCM:${HOME}/app/MuseV/diffusers/src:${HOME}/app/MuseV/controlnet_aux/src:${HOME}/app/MuseV/scripts/gradio"
|
75 |
+
|
76 |
EXPOSE 7860
|
77 |
|
78 |
CMD ["python", "-u", "app.py"]
|
app.py
CHANGED
@@ -140,9 +140,19 @@ if not os.path.exists(video2video_path) or not os.path.exists(text2video_path):
|
|
140 |
print("Successfully copied modules")
|
141 |
else:
|
142 |
print("Error: Could not find modules in MuseV directory")
|
143 |
-
print(f"MuseV
|
|
|
|
|
|
|
144 |
if os.path.exists(GradioScriptsDir):
|
145 |
print(os.listdir(GradioScriptsDir))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
146 |
sys.exit(1)
|
147 |
|
148 |
try:
|
|
|
140 |
print("Successfully copied modules")
|
141 |
else:
|
142 |
print("Error: Could not find modules in MuseV directory")
|
143 |
+
print(f"MuseV directory contents:")
|
144 |
+
if os.path.exists(MuseVDir):
|
145 |
+
print(os.listdir(MuseVDir))
|
146 |
+
print(f"\nGradio scripts directory contents:")
|
147 |
if os.path.exists(GradioScriptsDir):
|
148 |
print(os.listdir(GradioScriptsDir))
|
149 |
+
else:
|
150 |
+
print("Gradio scripts directory does not exist")
|
151 |
+
# Try to find scripts directory
|
152 |
+
scripts_dir = os.path.join(MuseVDir, "scripts")
|
153 |
+
if os.path.exists(scripts_dir):
|
154 |
+
print("\nScripts directory contents:")
|
155 |
+
print(os.listdir(scripts_dir))
|
156 |
sys.exit(1)
|
157 |
|
158 |
try:
|