|
ARG CUDA_VERSION="12.1.1" |
|
ARG CUDNN_VERSION="8" |
|
ARG UBUNTU_VERSION="22.04" |
|
ARG DOCKER_FROM=nvidia/cuda:$CUDA_VERSION-cudnn$CUDNN_VERSION-devel-ubuntu$UBUNTU_VERSION |
|
|
|
|
|
FROM $DOCKER_FROM AS base |
|
|
|
|
|
RUN apt-get update -y && \ |
|
apt-get install -y python3 python3-pip python3-venv && \ |
|
apt-get install -y --no-install-recommends openssh-server openssh-client git git-lfs wget vim zip unzip curl && \ |
|
python3 -m pip install --upgrade pip && \ |
|
apt-get clean && \ |
|
rm -rf /var/lib/apt/lists/* |
|
|
|
|
|
RUN apt-get update && \ |
|
apt-get install -y nginx |
|
|
|
|
|
COPY default /etc/nginx/sites-available/default |
|
|
|
ENV PATH="/usr/local/cuda/bin:${PATH}" |
|
|
|
|
|
ARG PYTORCH="2.4.0" |
|
ARG CUDA="121" |
|
RUN pip3 install --no-cache-dir -U torch==$PYTORCH torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu$CUDA |
|
|
|
COPY --chmod=755 start-ssh-only.sh /start.sh |
|
COPY --chmod=755 start-original.sh /start-original.sh |
|
COPY --chmod=755 comfyui-on-workspace.sh /comfyui-on-workspace.sh |
|
COPY --chmod=755 ai-toolkit-on-workspace.sh /ai-toolkit-on-workspace.sh |
|
COPY --chmod=755 check_files.sh /check_files.sh |
|
|
|
|
|
RUN git clone https://github.com/comfyanonymous/ComfyUI.git && \ |
|
cd ComfyUI && \ |
|
pip3 install -r requirements.txt && \ |
|
cd custom_nodes && \ |
|
git clone https://github.com/ltdrdata/ComfyUI-Manager.git && \ |
|
git clone https://github.com/pythongosssss/ComfyUI-Custom-Scripts.git && \ |
|
cd /ComfyUI && \ |
|
mkdir pysssss-workflows |
|
|
|
COPY --chmod=755 start.sh /start.sh |
|
|
|
WORKDIR /workspace |
|
|
|
EXPOSE 8188 |
|
|
|
CMD [ "/start.sh" ] |