Defter77 commited on
Commit
d4a830e
·
verified ·
1 Parent(s): 0741e23

Upload Dockerfile with huggingface_hub

Browse files
Files changed (1) hide show
  1. Dockerfile +11 -25
Dockerfile CHANGED
@@ -41,7 +41,12 @@ RUN mkdir -p /app/ComfyUI/models/checkpoints \
41
  /app/ComfyUI/models/clip_vision \
42
  /app/ComfyUI/input \
43
  /app/ComfyUI/output \
44
- /app/workflows
 
 
 
 
 
45
 
46
  # Copy all required application files
47
  COPY requirements.txt .
@@ -49,30 +54,11 @@ COPY app.py .
49
  COPY start.sh .
50
  COPY download_models.py .
51
 
52
- # Copy workflow files
53
- COPY workflows/*.json /app/workflows/
54
-
55
- # Copy input images - using a shell command to handle LFS files
56
- COPY ComfyUI/input/*.jpg /app/ComfyUI/input/
57
-
58
- # Check if images are LFS pointers and extract actual content if needed
59
- RUN if grep -q "version https://git-lfs.github.com/spec/" /app/ComfyUI/input/*.jpg 2>/dev/null; then \
60
- echo "LFS files detected, fetching content..."; \
61
- cd /app && \
62
- git init . && \
63
- git config --global --add safe.directory /app && \
64
- git lfs install && \
65
- for file in /app/ComfyUI/input/*.jpg; do \
66
- if grep -q "version https://git-lfs.github.com/spec/" "$file"; then \
67
- echo "Converting LFS pointer: $file"; \
68
- pointer_content=$(cat "$file"); \
69
- file_oid=$(echo "$pointer_content" | grep "oid" | cut -d ":" -f 2 | tr -d " "); \
70
- file_size=$(echo "$pointer_content" | grep "size" | cut -d ":" -f 2 | tr -d " "); \
71
- echo "Replacing pointer with placeholder of correct size ($file_size bytes)"; \
72
- dd if=/dev/zero of="$file" bs=1 count="$file_size" 2>/dev/null; \
73
- fi; \
74
- done; \
75
- fi
76
 
77
  # Make scripts executable
78
  RUN chmod +x /app/start.sh
 
41
  /app/ComfyUI/models/clip_vision \
42
  /app/ComfyUI/input \
43
  /app/ComfyUI/output \
44
+ /app/workflows \
45
+ /tmp/comfyui_user
46
+
47
+ # Set permissions for directories that need write access
48
+ RUN chmod -R 777 /app/ComfyUI/output \
49
+ /tmp/comfyui_user
50
 
51
  # Copy all required application files
52
  COPY requirements.txt .
 
54
  COPY start.sh .
55
  COPY download_models.py .
56
 
57
+ # Try to copy workflow files - if these fail, they'll be downloaded by start.sh
58
+ COPY workflows/ /app/workflows/
59
+
60
+ # Instead of trying to copy LFS files in the Dockerfile, we'll let start.sh handle downloading them
61
+ # This ensures we always get the complete files rather than LFS pointers
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
62
 
63
  # Make scripts executable
64
  RUN chmod +x /app/start.sh