Spaces:
Sleeping
Sleeping
| # Kohya sd-scripts derlemeleri için PyTorch ve CUDA içeren temel imaj | |
| FROM pytorch/pytorch:2.3.0-cuda12.1-cudnn8-devel | |
| ENV DEBIAN_FRONTEND=noninteractive | |
| ENV GRADIO_SERVER_NAME="0.0.0.0" | |
| ENV GRADIO_SERVER_PORT=7860 | |
| # Sistem gereksinimlerini kur | |
| RUN apt-get update && apt-get install -y \ | |
| git \ | |
| libgl1 \ | |
| libglib2.0-0 \ | |
| && rm -rf /var/lib/apt/lists/* | |
| WORKDIR /app | |
| # 1. Fluxgym'i klonla | |
| RUN git clone https://github.com/cocktailpeanut/fluxgym . | |
| # 2. Kohya sd-scripts'i klonla | |
| RUN git clone -b sd3 https://github.com/kohya-ss/sd-scripts | |
| # 3. Pip constraint dosyası oluştur. | |
| # Bu dosya pip'in bağımlılık çözücüsünü belirli sürümlere kilitler: | |
| # lycoris-lora ve k-diffusion'ın tetiklediği eski pandas/torch sürümlerini engeller. | |
| RUN printf "torch==2.3.0\ntorchvision==0.18.0\nnumpy==1.26.4\npandas==2.2.3\n" > /constraints.txt | |
| # 4. sd-scripts bağımlılıklarını constraint ile kur | |
| # requirements.txt icinde yerel paket referansi var, dizinden calistirilmali | |
| RUN cd sd-scripts && pip install --no-cache-dir -c /constraints.txt -r requirements.txt | |
| # 5. fluxgym bağımlılıklarını constraint ile kur | |
| RUN pip install --no-cache-dir -c /constraints.txt -r requirements.txt | |
| # Gradio arayüzünü başlat | |
| CMD ["python", "app.py"] |