File size: 961 Bytes
d414280
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
40
41
FROM pytorch/pytorch:1.10.0-cuda11.3-cudnn8-runtime

# Install system dependencies
RUN apt-get update && apt-get install -y \
    ffmpeg \
    libgl1-mesa-glx \
    git \
    wget \
    unzip \
    libsndfile1 \
    && rm -rf /var/lib/apt/lists/*

# Set up a non-root user for Hugging Face Space compatibility
RUN useradd -m -u 1000 user
USER user
WORKDIR /home/user

# Copy project files
COPY --chown=user requirements.txt .
COPY --chown=user . .

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

# Create necessary directories
RUN mkdir -p visualise/smplx_model \
    && mkdir -p experiments \
    && mkdir -p visualise/video/body-pixel \
    && mkdir -p visualise/video/body-pixel2 \
    && mkdir -p demo_audio

# Set environment variables for GPU and Python
ENV PYTHONUNBUFFERED=1
ENV NVIDIA_VISIBLE_DEVICES=all
ENV NVIDIA_DRIVER_CAPABILITIES=all

# Expose Gradio port
EXPOSE 7860

# Default command
CMD ["python", "app.py"]