|
|
|
FROM nvidia/cuda:12.2.2-base-ubuntu22.04 |
|
|
|
|
|
RUN apt-get update -y && apt-get install -y \ |
|
python3-pip \ |
|
python3-dev \ |
|
git \ |
|
build-essential |
|
|
|
|
|
ENV PUID=${PUID:-1000} |
|
ENV PGID=${PGID:-1000} |
|
|
|
|
|
RUN groupadd -g "${PGID}" appuser |
|
|
|
RUN useradd -m -s /bin/sh -u "${PUID}" -g "${PGID}" appuser |
|
|
|
WORKDIR /app |
|
|
|
RUN git clone https://github.com/cocktailpeanut/fluxgym && \ |
|
cd fluxgym && \ |
|
pip install --no-cache-dir -r ./requirements.txt && \ |
|
git clone -b sd3 https://github.com/kohya-ss/sd-scripts && \ |
|
cd sd-scripts && \ |
|
pip install --no-cache-dir -r ./requirements.txt |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
RUN pip install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu122/torch_stable.html |
|
|
|
RUN chown -R appuser:appuser /app |
|
|
|
|
|
RUN cd .. |
|
RUN rm -r ./sd-scripts |
|
RUN rm ./requirements.txt |
|
|
|
|
|
USER appuser |
|
|
|
|
|
COPY . ./fluxgym |
|
|
|
EXPOSE 7860 |
|
|
|
ENV GRADIO_SERVER_NAME="0.0.0.0" |
|
|
|
WORKDIR /app/fluxgym |
|
|
|
|
|
CMD ["python3", "./app.py"] |