File size: 830 Bytes
73ed896
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
FROM nvidia/cuda:11.8.0-runtime-ubuntu22.04

WORKDIR /code

# Install system dependencies
RUN apt-get update && apt-get install -y \
    python3.9 \
    python3-pip \
    git \
    ffmpeg \
    libsm6 \
    libxext6 \
    && rm -rf /var/lib/apt/lists/*

# Install Python dependencies
COPY requirements.txt .
RUN pip3 install --no-cache-dir -r requirements.txt

# Clone and install MMAudio
RUN git clone https://github.com/hkchengrex/MMAudio.git && \
    cd MMAudio && \
    pip3 install -e .

# Copy the application files
COPY app.py .

# Create output directory
RUN mkdir -p output/gradio && chmod 777 output/gradio

# Set environment variables for Hugging Face Spaces
ENV PYTHONUNBUFFERED=1
ENV GRADIO_SERVER_NAME=0.0.0.0
ENV GRADIO_SERVER_PORT=7860

# Expose the port
EXPOSE 7860

# Run the Gradio app
CMD ["python3", "app.py"]