Spaces:
Runtime error
Runtime error
Phil Sobrepena
commited on
Commit
·
c5cb92f
1
Parent(s):
9b08090
dependencies
Browse files- Dockerfile +23 -8
- app.py +5 -2
Dockerfile
CHANGED
@@ -11,6 +11,7 @@ RUN apt-get update && apt-get install -y \
|
|
11 |
ffmpeg \
|
12 |
libsm6 \
|
13 |
libxext6 \
|
|
|
14 |
&& rm -rf /var/lib/apt/lists/*
|
15 |
|
16 |
# Ensure we're using Python 3.10
|
@@ -25,18 +26,32 @@ RUN git clone https://github.com/hkchengrex/MMAudio.git
|
|
25 |
# Set working directory to MMAudio
|
26 |
WORKDIR /code/MMAudio
|
27 |
|
28 |
-
# Install dependencies
|
29 |
-
RUN pip3 install --no-cache-dir
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
34 |
|
35 |
# Create output directory
|
36 |
RUN mkdir -p output/gradio && chmod 777 output/gradio
|
37 |
|
38 |
-
#
|
39 |
-
|
40 |
|
41 |
# Set environment variables for Hugging Face Spaces
|
42 |
ENV PYTHONUNBUFFERED=1
|
|
|
11 |
ffmpeg \
|
12 |
libsm6 \
|
13 |
libxext6 \
|
14 |
+
curl \
|
15 |
&& rm -rf /var/lib/apt/lists/*
|
16 |
|
17 |
# Ensure we're using Python 3.10
|
|
|
26 |
# Set working directory to MMAudio
|
27 |
WORKDIR /code/MMAudio
|
28 |
|
29 |
+
# Install base dependencies first
|
30 |
+
RUN pip3 install --no-cache-dir \
|
31 |
+
setuptools \
|
32 |
+
wheel \
|
33 |
+
numpy==1.24.3 \
|
34 |
+
colorlog \
|
35 |
+
typing_extensions
|
36 |
+
|
37 |
+
# Install PyTorch and related packages
|
38 |
+
RUN pip3 install --no-cache-dir \
|
39 |
+
torch==2.1.2 \
|
40 |
+
torchvision==0.16.2 \
|
41 |
+
torchaudio==2.1.2 \
|
42 |
+
--index-url https://download.pytorch.org/whl/cu118
|
43 |
+
|
44 |
+
# Install other dependencies
|
45 |
+
RUN pip3 install --no-cache-dir -r requirements.txt
|
46 |
+
|
47 |
+
# Install MMAudio
|
48 |
+
RUN pip3 install -e .
|
49 |
|
50 |
# Create output directory
|
51 |
RUN mkdir -p output/gradio && chmod 777 output/gradio
|
52 |
|
53 |
+
# Copy app.py (we'll use our own version instead of the one from the repo)
|
54 |
+
COPY app.py .
|
55 |
|
56 |
# Set environment variables for Hugging Face Spaces
|
57 |
ENV PYTHONUNBUFFERED=1
|
app.py
CHANGED
@@ -232,5 +232,8 @@ if __name__ == "__main__":
|
|
232 |
args = parser.parse_args()
|
233 |
|
234 |
gr.TabbedInterface([video_to_audio_tab, text_to_audio_tab, image_to_audio_tab],
|
235 |
-
['Video-to-Audio', 'Text-to-Audio', 'Image-to-Audio (experimental)']).launch(
|
236 |
-
|
|
|
|
|
|
|
|
232 |
args = parser.parse_args()
|
233 |
|
234 |
gr.TabbedInterface([video_to_audio_tab, text_to_audio_tab, image_to_audio_tab],
|
235 |
+
['Video-to-Audio', 'Text-to-Audio', 'Image-to-Audio (experimental)']).launch(
|
236 |
+
server_name="0.0.0.0",
|
237 |
+
server_port=7860,
|
238 |
+
auth=("admin", "sonisphere"),
|
239 |
+
allowed_paths=[output_dir])
|