generative-disco / Dockerfile
Vivian Liu
Dockerfile
5250b06
raw
history blame
1.36 kB
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 openai numba
# 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"]