Spaces:
Running
on
T4
Running
on
T4
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"] |