Skip to content

Commit

Permalink
Merge pull request #18 from mmartial/20250216
Browse files Browse the repository at this point in the history
20250216
  • Loading branch information
mmartial authored Feb 17, 2025
2 parents 38ba2cc + a242166 commit 00cc071
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ DOCKER_BUILD_ARGS=
##DOCKER_BUILD_ARGS="--no-cache"

#BUILD_DATE=$(shell printf '%(%Y%m%d)T' -1)
BUILD_DATE=20250202
BUILD_DATE=20250216

COMFYUI_CONTAINER_NAME=comfyui-nvidia-docker

Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -628,6 +628,7 @@ Make sure to change file ownership to the user with the `WANTED_UID` and `WANTED

# 7. Changelog

- 20250216: Fix issue with empty `BASE_DIRECTORY` variable
- 20250202: Added `BASE_DIRECTORY` variable
- 20250116: Happy 2nd Birthday ComfyUI -- added multiple builds for different base Ubuntu OS and CUDA combinations + added `ffmpeg` into the base container.
- 20250109: Integrated `SECURITY_LEVELS` within the docker arguments + added `libGL` into the base container.
Expand Down
13 changes: 12 additions & 1 deletion init.bash
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,15 @@ cmd_seclvl=$3
cmd_basedir=$4
cmd_cmdline_base=$5
cmd_cmdline_extra=$6
echo " - script_fullname: ${script_fullname}"
echo " - cmd_wuid: ${cmd_wuid}"
echo " - cmd_wgid: ${cmd_wgid}"
echo " - cmd_seclvl: ${cmd_seclvl}"
echo " - cmd_basedir: ${cmd_basedir}"
echo " - cmd_cmdline_base: ${cmd_cmdline_base}"
echo " - cmd_cmdline_extra: ${cmd_cmdline_extra}"
echo "======================================"
ignore_value="VALUE_TO_IGNORE"

# everyone can read our files by default
umask 0022
Expand Down Expand Up @@ -74,7 +83,8 @@ if [ -z "$SECURITY_LEVEL" ]; then SECURITY_LEVEL=$cmd_seclvl; fi
if [ -z "$SECURITY_LEVEL" ]; then echo "-- No SECURITY_LEVEL provided, using comfy default of normal"; SECURITY_LEVEL="normal"; fi

if [ -z "$BASE_DIRECTORY" ]; then BASE_DIRECTORY=$cmd_basedir; fi
if [ ! -z "$BASE_DIRECTORY" ]; then if [ ! -d "$BASE_DIRECTORY" ]; then error_exit "BASE_DIRECTORY requested but not found or not a directory ($BASE_DIRECTORY)"; fi; fi
if [ -z "$BASE_DIRECTORY" ]; then BASE_DIRECTORY=$ignore_value; fi
if [ ! -z "$BASE_DIRECTORY" ]; then if [ $BASE_DIRECTORY != $ignore_value ] && [ ! -d "$BASE_DIRECTORY" ]; then error_exit "BASE_DIRECTORY requested but not found or not a directory ($BASE_DIRECTORY)"; fi; fi

# The script is started as comfy
# if the UID/GID are not correct, we create a new comfytoo user with the correct UID/GID which will restart the script
Expand Down Expand Up @@ -158,6 +168,7 @@ if [ ! -d "ComfyUI" ]; then error_exit "ComfyUI not found"; fi
it=ComfyUI/.testfile && rm -f $it || error_exit "Failed to write to ComfyUI directory as the comfy user"

# Check on BASE_DIRECTORY
if [ "$BASE_DIRECTORY" == "$ignore_value" ]; then BASE_DIRECTORY=""; fi
if [ ! -z "$BASE_DIRECTORY" ]; then
if [ ! -d "$BASE_DIRECTORY" ]; then error_exit "BASE_DIRECTORY ($BASE_DIRECTORY) not found or not a directory"; fi
it=$BASE_DIRECTORY/.testfile && touch $it && rm -f $it || error_exit "Failed to write to BASE_DIRECTORY"
Expand Down

0 comments on commit 00cc071

Please sign in to comment.