Spaces:
Paused
Paused
File size: 2,633 Bytes
299dee8 e2bbe2b 299dee8 e2bbe2b 299dee8 e2bbe2b 299dee8 e2bbe2b 8ecf3ae e2bbe2b 299dee8 e2bbe2b 6689001 e2bbe2b e0da34d e2bbe2b 299dee8 e2bbe2b 2312519 e2bbe2b |
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 64 65 66 67 |
# 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 |