bagaseptian commited on
Commit
997617b
·
verified ·
1 Parent(s): a8149d6

Upload 2 files

Browse files

"initial Docker file and README"

Files changed (2) hide show
  1. Dockerfile +30 -0
  2. README.md +16 -8
Dockerfile ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # --- Frontend Builder Stage ---
2
+ FROM node:18-slim AS frontend-builder
3
+ WORKDIR /app_frontend
4
+ #install git
5
+ RUN apt-get update && apt-get install -y git
6
+ #cloning github
7
+ RUN git clone --depth 1 https://github.com/BagaSept26/ComfyUI_frontend .
8
+ RUN if [ -f "package-lock.json" ]; then npm ci; \
9
+ elif [ -f "yarn.lock" ]; then yarn install --frozen-lockfile; \
10
+ else npm install; fi
11
+ #BUILD FRONTEND
12
+ RUN npm run build
13
+
14
+ # --- Backend Stage ---
15
+ FROM python:3.10-slim
16
+ WORKDIR /app
17
+ RUN apt-get update && apt-get install -y --no-install-recommends \
18
+ git wget libgl1-mesa-glx libglib2.0-0 \
19
+ && rm -rf /var/lib/apt/lists/*
20
+
21
+ #clonong github backend
22
+ RUN git clone --depth 1 https://github.com/BagaSept26/ComfyUI backend
23
+ RUN pip install --no-cache-dir -r backend/requirements.txt
24
+
25
+ RUN mkdir -p backend/web
26
+ RUN rm -rf backend/web/*
27
+ COPY --from=frontend-builder /app_frontend/dist/ backend/web/
28
+ # Pastikan /dist/ adalah output build frontend
29
+ EXPOSE 7860
30
+ CMD ["python", "backend/main.py", "--listen", "0.0.0.0", "--port", "7860", "--preview-method", "none"]
README.md CHANGED
@@ -1,12 +1,20 @@
 
 
1
  ---
2
- title: Comfyui Lab
3
- emoji: 🏢
4
- colorFrom: yellow
5
- colorTo: pink
6
  sdk: docker
7
- pinned: false
8
- license: apache-2.0
9
- short_description: generate image low-end-device
10
  ---
11
 
12
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
 
 
 
 
 
 
 
 
1
+
2
+
3
  ---
4
+ title: Studio Kreatif AI #
5
+ emoji: 🚀
 
 
6
  sdk: docker
7
+ app_port: 7860
8
+ # hardware : cpu-basic
9
+
10
  ---
11
 
12
+ # Custom ComfyUI Project
13
+
14
+ implementasi ComfyUI yang menggunakan backend dan frontend
15
+
16
+ ## Setup dan Menjalankan
17
+
18
+ Proyek ini dikonfigurasi untuk dijalankan di Gitpod dan di-deploy ke Hugging Face Spaces.
19
+
20
+ **Catatan:** Model checkpoint dan VAE perlu diunggah manual ke direktori yang sesuai (`backend/models/checkpoints/` dan `backend/models/vae/`) di dalam "Files" Space ini setelah aplikasi berjalan.