File size: 935 Bytes
53c4865
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
42
FROM nvidia/cuda:12.1.1-cudnn8-runtime-ubuntu22.04

# Set non-interactive installation and avoid unnecessary packages
ENV DEBIAN_FRONTEND=noninteractive
ENV TZ=Asia/Shanghai

# Install basic tools and Python
RUN apt-get update && apt-get install -y \

    git \
    python3 \
    python3-pip \
    ffmpeg \
    libgl1-mesa-glx \
    libglib2.0-0 \
    && apt-get clean \
    && rm -rf /var/lib/apt/lists/*

# Set working directory
WORKDIR /app

# Copy required files
COPY requirements.txt ./
COPY app.py ./
COPY setup.sh ./
COPY README.md ./
COPY diffusers_helper ./diffusers_helper

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

# Create required directories
RUN mkdir -p /app/outputs
RUN mkdir -p /app/hf_download

# Set permissions
RUN chmod +x setup.sh

# Set environment variable
ENV HF_HOME=/app/hf_download

# Run application
CMD ["python3", "app.py"]