-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDocker
More file actions
51 lines (40 loc) · 1.17 KB
/
Docker
File metadata and controls
51 lines (40 loc) · 1.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# =========================================
# DOCKERFILE for Flux/Custom LoRA Training
# =========================================
# 1. Base: Clean Python 3.12 Environment
FROM python:3.12-slim
# 2. Set working directory
WORKDIR /workspace
# 3. System packages
RUN apt-get update && apt-get install -y \
git \
git-lfs \
curl \
wget \
libgl1 \
jq \
&& rm -rf /var/lib/apt/lists/*
# 4. Install Python requirements
RUN pip install --no-cache-dir --upgrade \
torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu121 \
diffusers \
transformers \
accelerate \
safetensors \
huggingface-hub \
hf_transfer \
toml
# 4.5 Install Jupyter
RUN pip install --no-cache-dir jupyter
# 5. Huggingface Faster Transfers
ENV HF_HUB_ENABLE_HF_TRANSFER=1
# 6. Clone diffusion-pipe repository
RUN git clone https://github.com/tdrussell/diffusion-pipe.git /workspace/diffusion-pipe
# 7. Copy start script
COPY start.sh /workspace/start.sh
RUN chmod +x /workspace/start.sh
# 8. Entrypoint
ENTRYPOINT ["/workspace/start.sh"]
EXPOSE 8000
# 9. Default CMD (just in case)
CMD ["bash"]