File size: 1,396 Bytes
424e416
5303d77
 
7f6e42c
5303d77
7f6e42c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5303d77
 
7f6e42c
 
 
974ff52
5303d77
7f6e42c
 
 
 
5303d77
7f6e42c
5303d77
 
7f6e42c
 
 
5303d77
7f6e42c
5303d77
 
7f6e42c
5250b06
5303d77
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63

FROM nvidia/cuda:12.2.0-base-ubuntu22.04

ENV DEBIAN_FRONTEND noninteractive

# Update and install necessary packages
RUN apt-get update -y && apt-get upgrade -y \
    && apt-get install -y \
    libgl1 \
    libgl1-mesa-glx \
    libglib2.0-0 \
    wget \
    git \
    git-lfs \
    python3-pip \
    python-is-python3 \
    snapd \
    curl \
    ca-certificates \
    sudo \
    zip \
    unzip \
    htop \
    bzip2 \
    libx11-6 \
    build-essential \
    libsndfile-dev \
    software-properties-common \
    && apt-get clean

# Add FFmpeg PPA and install FFmpeg
RUN add-apt-repository ppa:savoury1/ffmpeg4 -y \
    && apt-get update -y \
    && apt-get install -y ffmpeg \
    && apt-get clean

# Upgrade pip
RUN pip3 install --upgrade pip

# Clone the repository and install Python dependencies
RUN git clone https://github.com/hellovivian/generative-disco.git \
    && cd generative-disco \
    && pip install --ignore-installed stable_diffusion_videos==0.8.0 openai numba realesrgan diffusers==0.11.1

# Add user and give permissions
RUN adduser --disabled-password --gecos '' user \
    && adduser user sudo \
    && chown -R user:user /generative-disco/static/

# Switch to the new user
USER user

# Set working directory and copy contents
WORKDIR /generative-disco
COPY . .

# Expose the port
EXPOSE 7860

# Run the application
CMD ["python", "stable_diffusion_videos/app.py"]