demo / Dockerfile
Phil Sobrepena
demo
f47eaa6
raw
history blame
1.04 kB
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/*
# Clone MMAudio and install dependencies
RUN git clone https://github.com/hkchengrex/MMAudio.git && \
cd MMAudio && \
# Install PyTorch first as specified in README
pip3 install torch==2.1.2 torchvision==0.16.2 torchaudio==2.1.2 --index-url https://download.pytorch.org/whl/cu118 && \
# Install additional dependencies
pip3 install -r requirements.txt && \
# Install MMAudio
pip3 install -e .
# Set working directory to MMAudio
WORKDIR /code/MMAudio
# 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 Gradio port
EXPOSE 7860
# Run the Gradio demo
CMD ["python3", "gradio_demo.py"]