Skip to content

Commit

Permalink
Merge pull request #5 from mmartial/20250108-Fix
Browse files Browse the repository at this point in the history
20250109
  • Loading branch information
mmartial authored Jan 10, 2025
2 parents 0ad7f10 + 89c253a commit 7f574ca
Show file tree
Hide file tree
Showing 4 changed files with 113 additions and 71 deletions.
6 changes: 6 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,19 @@ RUN apt-get update -y --fix-missing \
python3-venv \
git \
sudo \
libgl1 \
libglib2.0-0 \
&& apt-get clean

ENV BUILD_FILE="/etc/image_base.txt"
ARG BASE_DOCKER_FROM
RUN echo "DOCKER_FROM: ${BASE_DOCKER_FROM}" | tee ${BUILD_FILE}
RUN echo "CUDNN: ${NV_CUDNN_PACKAGE_NAME} (${NV_CUDNN_VERSION})" | tee -a ${BUILD_FILE}

ARG BUILD_BASE="unknown"
LABEL comfyui-nvidia-docker-build-from=${BUILD_BASE}
RUN it="/etc/build_base.txt"; echo ${BUILD_BASE} > $it && chmod 555 $it

##### ComfyUI preparation
# The comfy user will have UID 1024 and GID 1024
ENV COMFYUSER_DIR="/comfy"
Expand Down
10 changes: 7 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,11 @@ DOCKER_CMD=docker
DOCKER_FROM=nvidia/cuda:12.3.2-runtime-ubuntu22.04

BUILD_DATE=$(shell printf '%(%Y%m%d_%H%M)T' -1)
BUILD_BASE=ubuntu22_cuda12.3

COMFYUI_CONTAINER_NAME=comfyui-nvidia-docker
NAMED_BUILD=${COMFYUI_CONTAINER_NAME}:${BUILD_DATE}
BUILD_TAG=${BUILD_BASE}-latest
NAMED_BUILD=${COMFYUI_CONTAINER_NAME}:${BUILD_TAG}
NAMED_BUILD_LATEST=${COMFYUI_CONTAINER_NAME}:latest

DOCKERFILE=Dockerfile
Expand Down Expand Up @@ -36,7 +38,7 @@ build:


latest:
@VAR_NT=${COMFYUI_CONTAINER_NAME}-${COMFYUI_VERSION} USED_BUILD=${NAMED_BUILD} USED_BUILD_LATEST=${NAMED_BUILD_LATEST} make build_main_actual
@VAR_NT=${COMFYUI_CONTAINER_NAME}-${BUILD_TAG} USED_BUILD=${NAMED_BUILD} USED_BUILD_LATEST=${NAMED_BUILD_LATEST} make build_main_actual


build_main_actual:
Expand All @@ -46,6 +48,7 @@ build_main_actual:
@echo " --build-arg DOCKER_FROM=\"${DOCKER_FROM}\" \\" >> ${VAR_NT}.cmd
@echo " --build-arg BASE_DOCKER_FROM=\"${DOCKER_FROM}\" \\" >> ${VAR_NT}.cmd
@echo " --build-arg BUILD_DATE=\"${BUILD_DATE}\" \\" >> ${VAR_NT}.cmd
@echo " --build-arg BUILD_BASE=\"${BUILD_BASE}\" \\" >> ${VAR_NT}.cmd
@echo " --tag=\"${USED_BUILD}\" \\" >> ${VAR_NT}.cmd
@echo " -f ${DOCKERFILE} \\" >> ${VAR_NT}.cmd
@echo " ." >> ${VAR_NT}.cmd
Expand All @@ -66,6 +69,7 @@ docker_rmi:
docker rmi --force ${NAMED_BUILD} ${DOCKERHUB_REPO}/${NAMED_BUILD} ${NAMED_BUILD_LATEST} ${DOCKERHUB_REPO}/${NAMED_BUILD_LATEST}


############################################## For maintainer only
##### push
DOCKERHUB_REPO="mmartial"

Expand All @@ -77,7 +81,7 @@ docker_tag:

docker_tag_list:
@echo "Docker images tagged:"
@${DOCKER_CMD} images --filter "label=comfyui-nvidia-docker-build=${BUILD_DATE}"
@${DOCKER_CMD} images --filter "label=comfyui-nvidia-docker-build"

docker_push:
@make docker_tag
Expand Down
Loading

0 comments on commit 7f574ca

Please sign in to comment.