mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2026-02-03 22:31:42 -08:00
adding dockerfile
This commit is contained in:
parent
db1770e292
commit
802746cf5e
1 changed files with 41 additions and 0 deletions
41
Dockerfile
Normal file
41
Dockerfile
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
# Use an official Python runtime as the base image
|
||||
FROM nvidia/cuda:12.2.2-runtime-ubuntu22.04
|
||||
|
||||
# Set environment variables
|
||||
ENV STABLE_DIFFUSION_API_PORT=7861
|
||||
ENV WORKDIR /app
|
||||
|
||||
# Create a working directory and set permissions
|
||||
RUN mkdir -p $WORKDIR
|
||||
WORKDIR $WORKDIR
|
||||
|
||||
# Install Python, pip, and other necessary dependencies
|
||||
RUN apt-get update && \
|
||||
apt-get install -y python3 python3-pip git wget && \
|
||||
ln -s /usr/bin/python3 /usr/bin/python && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Clone the stable-diffusion-webui repository
|
||||
RUN git clone https://github.com/Moonlite-Media/stable-diffusion-webui.git .
|
||||
|
||||
# Set up models folder and download required models
|
||||
RUN mkdir -p models && \
|
||||
cd models && \
|
||||
wget -q https://huggingface.co/stabilityai/stable-diffusion-2/resolve/main/768-v-ema.safetensors
|
||||
|
||||
# Set up extensions folder and clone repositories
|
||||
RUN mkdir -p extensions && \
|
||||
cd extensions && \
|
||||
git clone https://github.com/cheald/sd-webui-loractl.git && \
|
||||
git clone https://github.com/Mikubill/sd-webui-controlnet && \
|
||||
git clone https://github.com/deforum-art/sd-webui-deforum
|
||||
|
||||
# Install Python dependencies
|
||||
COPY requirements.txt .
|
||||
RUN pip install -r requirements.txt
|
||||
|
||||
# Copy the .env file from the GitHub Action if it’s created at build time
|
||||
# COPY .env ./.env
|
||||
|
||||
# Run the application
|
||||
CMD ["python", "launch.py", "--nowebui", "--deforum-api", "--api", "--skip-torch-cuda-test"]
|
||||
Loading…
Add table
Add a link
Reference in a new issue