Spaces:
Paused
Paused
# Dockerfile Public A10G | |
# Use an NVIDIA CUDA base image with Ubuntu 22.04 | |
FROM nvidia/cuda:11.7.1-base-ubuntu22.04 | |
# Set noninteractive to avoid interactive prompts during the build process | |
ENV DEBIAN_FRONTEND noninteractive | |
# Update the package repository and install necessary packages | |
RUN apt-get update -y \ | |
&& apt-get upgrade -y \ | |
&& apt-get install -y libgl1 libglib2.0-0 wget git git-lfs python3-pip python-is-python3 \ | |
# Clean up to reduce image size | |
&& rm -rf /var/lib/apt/lists/* | |
# Set the working directory | |
WORKDIR / | |
# Upgrade pip to the latest version | |
RUN pip3 install --upgrade pip | |
# Install a specific version of PyTorch compatible with xFormers | |
# This may need to be adjusted based on CUDA version compatibility | |
RUN pip3 install torch==2.0.1+cu118 -f https://download.pytorch.org/whl/torch_stable.html | |
# Install specific versions of other dependencies as needed | |
RUN pip install --pre triton \ | |
&& pip install numexpr torchmetrics==0.11.4 | |
# Expose port 7860 for web service | |
EXPOSE 7860 | |
# Set environment variable for command line arguments | |
ENV COMMANDLINE_ARGS=--api | |
# Command to run the application | |
# CMD ["python", "webui.py", "--api", "--xformers", "--listen", "--disable-console-progressbars", "--enable-console-prompts", "--no-progressbar-hiding", "--ui-config-file", "webui-user.bat", "--opt-sdp-no-mem-attention", "--no-half-vae", "--opt-channelslast"] | |
# original Dockerfile | |
# # Dockerfile Public A10G | |
# # https://gitlab.com/nvidia/container-images/cuda/-/blob/master/dist/11.7.1/ubuntu2204/devel/cudnn8/Dockerfile | |
# # FROM nvidia/cuda:11.7.1-cudnn8-devel-ubuntu22.04 | |
# # https://gitlab.com/nvidia/container-images/cuda/-/blob/master/dist/11.7.1/ubuntu2204/base/Dockerfile | |
# FROM nvidia/cuda:11.7.1-base-ubuntu22.04 | |
# ENV DEBIAN_FRONTEND noninteractive | |
# RUN apt-get update -y && apt-get upgrade -y && apt-get install -y libgl1 libglib2.0-0 wget git git-lfs python3-pip python-is-python3 && rm -rf /var/lib/apt/lists/* | |
# WORKDIR / | |
# RUN pip3 install --upgrade pip | |
# # RUN pip install https://github.com/camenduru/stable-diffusion-webui-colab/releases/download/0.0.16/xformers-0.0.16+814314d.d20230119.A10G-cp310-cp310-linux_x86_64.whl | |
# RUN pip install --pre triton | |
# RUN pip install numexpr torchmetrics==0.11.4 | |
# EXPOSE 7860 | |
# set COMMANDLINE_ARGS=--api | |
# # RUN python launch.py --skip-torch-cuda-test --num_cpu_threads_per_process=6 --api | |
# # CMD python webui.py --api --xformers --listen --disable-console-progressbars --enable-console-prompts --no-progressbar-hiding --ui-config-file | |
# CMD webui-user.bat --opt-sdp-no-mem-attention --no-half-vae --opt-channelslast |